Bug in spawnflags (the team_WOLF_checkpoint type, not a key)


(G0-Gerbil) #1

I want a flag that allies have and can spawn at.
When axis touch it, I want no flag, allies to lose their spawn, and no other effect (eg axis spawns not to change).

Well, setting it up with spawnflags of 9 (spawnpoint and allied_only) means I get mostly what I want, but…

As we all know by now, flags start in a neutral state. Well, the problem occurs if allies never bother to touch the flag, and then axis comes along and attempts to touch it. Well, nothing happens - no axis_capture trigger is called, meaning in this scenario, axis have no way of cancelling the flag’s effect (which obviously start on by default).

I’d hate to have to use a normal flag and simply have no axis spawns to toggle, because the axis flag would undoubtedly confuse n00bs.

If anyone can help, there’s a few digital :drink: in it :wink:


(G0-Gerbil) #2

Oh well, double checked in test map and it’s buggy.
But!

A workaround is to have a trigger_multiple where the flag is that can only be activated by Axis.
In the two <team>_capture triggers I setstate the trigger_multiple invisible (hiding it, cos it’s only for a single use in one circumstance).
The trigger_multiple targets a target_script_trigger that calls a relay script (just a dummy one that passes on messages to other objects - this is required to make sure ET calls the right object instance). The relay script then manually calls the trigger axis_capture (so it processes the same as a proper flag cap, and removes the trigger multiple).

Bit of a pain, but it works. If you are really anal you could also have the trigger_multiple target a target_speaker that plays the ‘flag changing’ sound effect for that perfect mimicry…


(Lanz) #3

If the flags effect is activated at start shouldn’t the Allied flag then be raised from start? If not, it would just be confusing.


(G0-Gerbil) #4

It would indeed be confusing, but that’s how it is.
You can’t get a flag no matter what it’s spawnflags, to start with the flag up.
You’ll notice in places like radar, oasis and battery the axis first spawn is by a flag that hasn’t actually been raised. Of course, everyone spawns very close indeed so the chances are extremely high someone will touch it, but still - no flag to start with.
The reason they don’t exhibit the same bug as my map is because they are capturable by both teams. In fact, none of the official maps ever use the spawnflag like I am, so I’m not suprised no-one spotted this bug.


(thore) #5

the forward spawn on mp_beach (et version) just behaves as you’re describing it. maybe you want to have a look at it’s script.


(G0-Gerbil) #6

Firstly, sadly it’s nothing to do with scripting :frowning:
Secondly - mp_beach does what I said they do above, meaning I need my fix detailled above.

Since you chose mp_beach (good example, I wracked my brains for a map that used it but couldn’t come up with it!).

The scenario is:

There’s a flag only allies can ‘get’ - axis merely ‘resets’ it.
However, the difference between my scenario and beach’s is that the flag in beach is not a spawn location for the flag’s team (allies) at the start.
In other words, Allies must capture it first before it’s effects kick in, and hence can be cancelled out by Axis.

To try to fit my needs into the mp_beach situation, imagine beach as it is but allies start the map with the forwrad bunker already captured.
Assuming no allied player touches the flag (they all run out to attack!) you are stuck with the flagpole alone, but with active spawns. Worse still, if Axis now touches the pole, nothing happens, no script event is generated to let the script know axis has ‘recaptured’ the flag.

Thinking about it more, I think possibly ‘bug’ is too strong a description. While the flag doesn’t behave how I want it to, it DOES behave logically in situations like mp_beach. The entity can’t do both in it’s current incarnation, I just got unlucky that the way I want to use it wasn’t the way the programmers chose to implement it :slight_smile:

You can try it out for yourself simply enough - create a box map with 3 flag poles. Make them all spawnflags.
On one, select the axis_only, on another, select allied_only and leave the last one (IE so both teams can get it).
Then give them scriptname keys of axis_flag, dual_flag and allied_flag (as appropriate.
Then use the following script:

game_manager
{
	spawn
	{
	}
}

axis_flag
{
	spawn
	{
	}

	trigger allied_capture
	{
		wm_announce "allied capture axis flag"
	}

	trigger axis_capture
	{
		wm_announce "axis capture axis flag"
	}
}

dual_flag
{
	spawn
	{
	}

	trigger allied_capture
	{
		wm_announce "allied capture dual flag"
	}

	trigger axis_capture
	{
		wm_announce "axis capture dual flag"
	}
}

allied_flag
{
	spawn
	{
	}

	trigger allied_capture
	{
		wm_announce "allied capture allied flag"
	}

	trigger axis_capture
	{
		wm_announce "axis capture allied flag"
	}
}

Then run it.
What you’ll find is that on map start, if you are axis, touching all 3 will only trigger 2 script responces (dual and axis only). If allies, touching all 3 will only trigger 2 as well (dual and allied only).
Note this is the FIRST touch only - once the team_only ones have been triggered properly the first time, they will happily toggle.

Anyway, I have a work-around that’s running fine. Still a bit annoying that the flag isn’t up at the start, but if I was really bothered I could probably find the flagpole and place it as a model manually until such time as one of the teams touch it (resulting in either the proper flag appearing, or no flags). I may do that for my next version, but hunting for models and stuff isn’t that much fun, so I’ll leave it as is for now :slight_smile:


(Ifurita) #7

Check this thread on CP spawning:

http://splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8543&sid=3874271f6dba62c64ceadac1091e998c

Mustard uses 2 accums to check status to determine what happens with spawns, etc. maybe a set up like that would work for you.


(G0-Gerbil) #8

Noooo… the problem is simply that the checkpoint flags as they stand don’t generate the ???_capture messages under certain circumstances. The rest of the stuff is fine. I’ve obviously done a pretty crap job of explaining myself since the replies have missed the point I was hoping to make :slight_smile:
I’ll chalk this one up to experience now then since I’ve already sorted it myself.

Thanks for the replies though guys, I appreciate the effort hug


(Ifurita) #9

I still have no idea what you are trying to do :wink:


(G0-Gerbil) #10

A flag that only allies can capture - if Axis touches it, the flag disappears (losing the Allied spawns associated with it).
The problem is I want the Allied team to start there, with the flag deemed to be ‘captured’ (even if the actual flag model itself is invsible) and the spawn points active.

Under these circumstances, Axis should be able to ‘clear it’ initially, but the script responce only happens if Allies actually touch the flag first - because all flags start off in an ‘uncaptured’ state.


(=DaRk=CrAzY-NuTTeR) #11

maby place the first allied spawn over the flag, then the first person to join the server will spawn on the flag, and capture it


(G0-Gerbil) #12

There’s no room - the flag is in a room, kinda like the oasis one, it has a roof :confused:

I’ll track down the models and sound effects later and post them here, along with a couple of sample maps - one that shows the problem, and the other to hide the problem as best we can.


(=DaRk=CrAzY-NuTTeR) #13

unless you make it manually with the actua moddels and trigger_multiples i dont know how you can do it :confused:


(Mean Mr. Mustard) #14

Let me see if I understand what you want. ( I got it in in your first post :wink: )

  1. A flag spawn that the allies intially have (but not necessarily the flag). They spawn here by default.
  2. If axis capture the flag, they force the allies to a ‘rear’ spawn but yet do not spawn at the flag themselves. (In fact axis never spawn at flag)
  3. Allies capture flag, then they spawn at flag again.

Is this correct? If so, then I’ve got a map/script for you that do that. All I really did was remove the team_CTF_redspawn from near the flag. This way, the axis can never spawn there. Now, the flag shows up on the CM only if a team captures it. So, if axis have it, it shows the axis flag - figured this was a good indicator on the CM who had owned the flag

http://www.cobaltcfd.com/et/spawn_flag2.zip


(G0-Gerbil) #15

Well, that will work because you are not using the flag checkpoint in a TEAM_only way. I know the way you describe it works but I don’t want an Axis flag if Allies are forced back (IE neither team spawns there).
A flag on a spawnflag implies that team can spawn there, which is not the case. Because the spawn point in question plays quite a confusing role in the map, I want to make it as clear as possible.

To elaborate - note this is just describing in full what I am having happen - but the actual problem has been simplified into the above posts.

  1. Allies start with a spawn point by a flag. If axis capture it, allies are pushed back but axis don’t spawn there.
  2. When axis blows an objective, the spawn point switches to be an axis spawn flag (losing allies the spawnpoints there if they were in possesion of the flag at that point). If axis capture it, they spawn there, if allies now capture it, they get pushed back.
  3. When axis achieve another objective, the flag disappears and axis gain the spawn points permenantly :slight_smile:

Simple eh? :wink: The fact that the flag can be, at different times, allied only or axis only is why I can’t risk having the actual flag shown if you can’t spawn there - it’s simply too confusing.


(Mean Mr. Mustard) #16

Ah, thanks for the clarification. I did have it working with the TEAM_only key checked, but the darn flag would not show on the CM :confused: I’ll keep trying…


(Mark.C) #17

I have just what your after gerbil, only thing is the flag pole doesn’t dissapear.

But if allies get it they can spawn their, if axis get it allies just loose spawn, axis dont (and cant) spawn their.


(G0-Gerbil) #18

OK send it over, I’m always happy to learn I did something wrong if it makes my life easier in future :slight_smile:


(Mark.C) #19

Do you have msn?

The flag is in a map i never got round to completing.


(FireFly) #20

@G0-Gerbil: I was just wondering if you managed to solve the problem, and if so how did you solved it.
atm i am having the same problem …
The only solution (the hard way) I had in mind is to take the flagpole-model into a 3d program like nmd3c (mD3Compile), modify it so that at start the pole shows a waving axis flag. And once the allies touch the pole make the “axis_pole” invisible…