Forward Spawn


(Locke) #1

In my map I have a forward captureable spawn with a flag. The spawn works fine, except that I want it to become under the control of the allies if a main entrance is dynamited. The problem is, if the spawn is controlled by the axis when the dynamite is blown, the forward flag simply disappears and doesn’t give the spawn to the allies like I had intended.

Here is the scripting for the forward spawn flag:


forward_flag
{
	spawn
	{
	
		accum 0 set 0 // Who owns flag: 0-Axis, 1-Allied, 2-Nobody
	
	}
	
	trigger axis_capture // Touched by an Axis player
	
	{
	
		accum 0 abort_if_equal 0 // do Axis own flag?
	
		accum 0 trigger_if_equal 1 forward_flag axis_reclaim // Reclaimed from Allies
	
		accum 0 set 0 // Axis own the flag
	
		wm_announce "Axis have captured the Bunker Flag!"
	
		setstate forward_wobj default

		wm_objective_status 1 0 1
		wm_objective_status 1 1 2

	
	}
	
	trigger axis_reclaim
	
	{
	
		alertentity forward_wobj // Switch command map marker
	
	}
	
	trigger allied_capture // Touched by an allied player
	
	{
	
		accum 0 abort_if_equal 1 // do Allies own flag?
	
		accum 0 set 1 // Allied own the flag
	
		wm_announce "Allies have captured the Bunker Flag!"
	
		setstate forward_wobj default
	
		alertentity forward_wobj // Switch command map marker

		wm_objective_status 1 0 2
		wm_objective_status 1 1 1
	
	}
}

And here is the scripting for my main entrance:


gate
{
	spawn
	{
		wait 300
		globalaccum 0 bitset 0
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		alertentity gate_bits1
		trigger gate_toi remove
		globalaccum 0 bitreset 0

		wm_announce "The Allies have destroyed the Main Entrance!"

		wm_removeteamvoiceannounce	0 "radar_axis_entrance1_stop"
		wm_removeteamvoiceannounce	1 "radar_allies_entrance1_destroy"

		trigger forward_flag allied_capture
		setautospawn "Bunker Flag" 1
		setstate forward_flag invisible

		wm_objective_status 1 0 2
		wm_objective_status 1 1 1
		wm_objective_status 3 0 2
		wm_objective_status 3 1 1

	}
}

As you can see, I put in the line “trigger forward_flag allied_capture” in an attempt to get the script to trigger that part of the forward_flag script. Weird thing is, it works. In-game when the gate is blown, the text “Allies have captured the Bunker Flag!” is shown. This is a wm_announce command in my forward_flag script so I know it must have been triggered correctly, and yet the spawns remain axis owned. Help?


(stealth6) #2

Can’t you just setstate the axis spawns invisible and the allies default when the gate is blown?


(nUllSkillZ) #3

You can copy from Oasis map.


(Locke) #4

Oh yeah, thanks, haha. All I had to do was copy and paste from Oasis. Thanks a million