Permanent Forward Spawn Problem


(Tasian) #1

I came across a bug today on my map, and I was wondering if anyone discovered this type of problem as well.

Here’s the situation: There’s a capturable forward spawn that becomes Allied permanently when the generator is blown with dynamite, just like Oasis, but with more electricity. :stuck_out_tongue: However, this time, the generator blew up, but the flag didn’t disappear, it was still capturable. Definitely made for an interesting change, but anywho… has anyone ever experienced this bug on Oasis, Radar, or any custom maps that use the permanent-spawn-once-something-is-blown thing?

Here’s my script concerning this, just in case anyone would want a looksee:


// Forward Spawn - Courtyard Spawn

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

	trigger axis_capture	// Flag has been touched by an Axis player
	{
		accum 6 abort_if_equal 0 // do Axis own flag?

		accum 6 set 0 // Axis own the pole
		wm_announce	"Axis reclaim the Courtyard!"

// *----------------------------------- vo ------------------------------------------*
// Stuff removed to save space
// *---------------------------------------------------------------------------------*

		wm_objective_status 		3 0 1
		wm_objective_status 		3 1 2

		alertentity courtyardflag_wobj
	}

	trigger allied_capture	// Flag has been touched by an allied player
	{
		accum 6 abort_if_equal 1 // do Allies own flag?

		accum 6 set 1 // Allied own the flag
		wm_announce	"Allies capture the Courtyard!"

// *----------------------------------- vo ------------------------------------------*
// Stuff removed to save space
// *---------------------------------------------------------------------------------*

		wm_objective_status 		3 0 2
		wm_objective_status 		3 1 1

		alertentity courtyardflag_wobj
	}

	trigger check_obj
	{
		accum 6 abort_if_equal 1 // Do Allied own the flag?

		wm_objective_status 		3 0 2
		wm_objective_status 		3 1 1

	}

	trigger force_allied
	{
		wm_removeteamvoiceannounce 0 "chateau_axis_defend_bunker"
		wm_removeteamvoiceannounce 1 "chateau_allies_capture_bunker"
		accum 6 abort_if_equal 1 // Do Allied own the flag?

		alertentity courtyardflag_wobj
		alertentity forward_spawn_spawn
	}

	trigger kill
	{
		remove
	}
}

----------------------

// Dynamite the Generator

generator
{
    spawn
    {
    wait 200
    constructible_class 3
    }
    death
    {
    setstate generatorhurt invisible
    setstate doorbutton invisible

    disablespeaker generator_noise

    wm_announce "Allies have destroyed the Generator and secured the Courtyard Spawn!"

    accum 0 bitset 11

    trigger ventgrate open
    trigger controls_door open

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

// *-------------vo-----------*
// Stuff removed to reduce space
// *-------------vo-----------*

    //Setting the Courtyard spawn to allies only

		trigger courtyardflag force_allied // Switch forward spawn to Allied ONLY

		trigger courtyardflag check_obj

		trigger courtyardflag kill

    }
}


Any problems? Or just a fluke? I appreciate any assistance on this. :slight_smile:


(=DaRk=CrAzY-NuTTeR) #2

nope, i cant see any scripting errors

do allied spawn there when the pole is captured, if so i would say it to be a fluke, if you cannot then there will be a scripting error i havnt spoted


(Drakir) #3

Stupid question perhaps, but do you have a “targetname” of “courtyardflag” on the spawnflag entity?


(Tasian) #4

Nutter: Yes, the Allies spawn at the flag, pretty much in the same area as the Axis.

Drakir: I’m very sure… I’ll post the involved entities anyway to make the situation clearer.


classname   team_WOLF_checkpoint
origin      -3296 -2112 -68
spawnflags  1
targetname  courtyardflag
scriptname  courtyardflag
objflags    4
target      forward_spawn_spawn

---

classname   team_WOLF_objective
origin      -3296 -2112 80
spawnflags  1
description Courtyard
targetname  courtyardflag_wobj
scriptname  courtyardflag_wobj

---

classname   team_CTF_bluespawn
targetname  forward_spawn_spawn
scriptname  forward_spawn_spawn
origin      <lots o' numbers>
angle       <yes>
spawnflags  1

----

classname   team_CTF_redspawn
targetname  forward_spawn_spawn
scriptname  forward_spawn_spawn
origin      <lots o' numbers>
angle       <yes>
spawnflags  3

The script has been working fine for a month, so I’m trying to determine if this bug was once of those ‘it just happens’ things… like vehicles not moving when they lose their HP, but not ‘breaking’ (so they can’t be fixed) until about 30 seconds to 2 minutes. So, if someone has seen the flag still remaining on Oasis after the City Wall was blown, I can chalk it up to game error and see if I can make the script more fail-proof… if I am able.


(MadJack) #5

Now that you mention it… I think it happened maybe once of twice that Axis recaptured the flag on Oasis after blowing the wall. I can’t be 100% sure but I think it happened.

If your script has been working for a long time before I think it’s just a fluke.


(Java.Lang) #6

When you say flag, do you mean the in-game model, or the command map marker?


(Tasian) #7

MadJack: That’s what I figured… I think this bug decided to appear because it happened on the same day I released beta 3 of Voilegarde. I think Radiant and scripting in general are out to kill me from stress. :stuck_out_tongue:

Java: I mean both. The flag simply did not disappear when it should have, but it still worked perfectly fine. Axis and Allies still fighting over it and whatnot. When the generator was blown, I wish I saw if they were fighting over it heavily with the flags getting a workout. Axis flag down, Allied up, Allied down, Axis up, Axis down, Allied u— and so on

Well, I guess I’ll let it go as just one of those things that happens 'cause … ‘stuff’ happens. Many thanks to everyone for their help, and check out the secret bar sometime on my map. :beer: :banana:


(SenF|Doddsy) #8

I have seen it only once and that was on Radar. We couldnt select the foward flag after blowing the main gate and have not seen it again! I am not entirely sure wether the flag was capturable or not, just knew there was a problem 'cos we couldnt select it after blowing the the main gate - we reset the match before really looking into it…

'Fraid I cant help with the script at all as know jack about scripting / coding etc so will leave you guys to it… :notworthy: