spawn switching problem


(Matt-J) #1

ok in my map i got 2 capturable spoawn… i want the axis to have bot ha t default… so it happens, i spawn at the closest one, but in teh limbo menu b4 game starts i cant select to spawn at one of them, same until i have captured them so basically… my question is how do imake it so they can spawn at eitehr spawn in the beginneing…

the second one is… is when the gamestart, i have to capture the flag that they spawned at(thexis) and then i die and i should erspawn right were i captured hte flag but i spawn at hte otehjr spawn… heres the code…

	trigger axis_capture
	{
		accum 0 abort_if_equal 0
		accum 0 set 0 
		wm_announce "Axis reclaim the Cafe!"
		setstate cafe_spawn_wobj default
		setautospawn "Cafe"	0
		setautospawn "City Entrance"	1
		alertentity cafe_spawn_wobj
		alertentity cafe_spawn
		accum 8 abort_if_equal 1
		accum 9 abort_if_equal 1
		alertentity cafe_spawn_wobj
		accum 9 set 1
	}

as u can see i alternate the cafe spawn(these are the spawns, all named with same name for axis and allies at thsi spawn) so i was thinkingthe problem could be that wehn the axis capture it initially, it changes it so teh allies spawn there… even though the setautospawn is set to taht ares. woudl i fix this by changign the names of the allied spawn to somethign different then the axis so for the initial capture by the axis, it dosent turn the allied spawns on adn the axis off…

i am not sure because htei problem might be able to be solved by fixing the first question.
thanks. sorry if its confusing lol


(Oxygen - o2) #2

i cant read it let alone understand it, check your spelling so its actually readable please

axis to have bot ha t default

makes no sense :confused:


(Ifurita) #3

He’s saying the axis own both spawns at game start.

Are the axis spawn points marked (spawnflags) as ‘startactive’?


(Oxygen - o2) #4

BTW the script looks ok as far as i can tell


(Malverik) #5

does your team_wolf_obj has the def_axis checked? is it invisible?

what are the accums 8 and 9?

you should not have to do “alertentity cafe_spawn” if you have set “target cafe_spawn” on your flag

if the cafe spawn belongs to the axis at the start, why is there “setstate cafe_spawn_wobj default” since it should already be default at the start?

did take example on another map?


(Ifurita) #6

Here’s the forward flag script from Vengeance_TE. It starts allied, is capturable, and goes perm axis when the bunker is destroyed. Only the forwardflag_wobj is being alertentitied and nothing is setstated default or invisible. I see
setstate cafe_spawn_wobj default in your script. You may want to check to see if it’s setstated invisible in the spawn or somewhere else


forward_spawn
{
	spawn
	{
		wait 200
		accum 0 set 1 // Who has the flag: 0-Axis, 1-Allied
	}

	trigger axis_capture
	{
		accum 0 abort_if_equal 0
		accum 0 set 0

		// Change the objective state internally, so UI can update, etc.
		// Axis takes control of forward flag

		// Some kind of UI pop-up to alert players
		wm_announce	"Axis capture the Ammo Depot!"

		// *----------------------------------- vo ----*
		wm_teamvoiceannounce 0 "vengeance_axis_obj_flag_captured"
		wm_teamvoiceannounce 1 "vengeance_allied_obj_flag_lost"
		// *----------------------------------- vo ----*

		wm_objective_status	6 1 2
		wm_objective_status	6 0 1

		alertentity forwardflag_wobj
	}

	trigger allied_capture
	{
		accum 0 abort_if_equal 1
		accum 0 set 1

		// Change the objective state internally, so UI can update, etc.
		// Allied takes control of forward flag

		// Some kind of UI pop-up to alert players
		wm_announce	"Allies capture the Ammo Depot!"
		
		// *----------------------------------- vo ----*
		wm_teamvoiceannounce 0 "vengeance_axis_obj_flag_lost"
		wm_teamvoiceannounce 1 "vengeance_allied_obj_flag_captured"
		// *----------------------------------- vo ----*

		wm_objective_status	6 1 1
		wm_objective_status	6 0 2

		alertentity forwardflag_wobj
	}

	trigger axis_keep
	{
		//setstate allied_forward_spawnblob invisible
		setautospawn "Allied Spawn" 0
		setautospawn "Forward Spawn" 1
		remove

		accum 0 abort_if_equal 0
		alertentity forwardflag_wobj
		alertentity forward_spawnblob
	}
}


(Matt-J) #7

sorry for all the spelling, i was tired, but anyway i lookedat ifuritas script and i think i see the problem… in his he has this for the spawn point


spawn 
   { 
      wait 200 
      accum 0 set 1 // Who has the flag: 0-Axis, 1-Allied 
   } 

in mine, i have


spawn
{
	wait 200
	accum 0 set 2
	accum 9 set 0
	accum 8 set 0
	setstate cafe_spawn_wobj invisible
}

the accum 0’s state who owns the flag… so i have mine set a 2 (no one owns it) but ifurita has his set on 1, so allies own it. Thats the problem.

I took my script from an example script EB sent me and i forgot to change those accums on both spawn points… taht should fix it.
oh and Malverik


accum 9 set 0	// Axis have not captures flag once yet
accum 8 set 0	// Allies have not captured flag once yet

thats wut the example script says hteaccums 8 and 9 stand for…

thanks for ur help guys

forgot the code brackets


(Matt-J) #8

oh and i too koff th setstate invisible after i tested the script with the accum 0 set at 0… so now its all fine… :smiley:


(Ifurita) #9

\o/