Problem with CTF / KOTH -flag


(nUllSkillZ) #1

Hi,

at the moment I’m working on a new concept map for CTF / KOTH (actually the teams have to hold / dominate the flag).
And I am using timer to sum up points for the teams that dominate flags in dependence of the time a team dominate a flag.
I am using “team_WOLF_objective”-eintities with the “models/multiplayer/flagpole/flagpole.md3”-model as flag.
There are three “trigger_objective_info”-entities (axis, allied and neutral) per flag each with a “misc_commandmap_marker”-entity.
I have created a custom image for the neutral TOI’s.

Here is the script part for one flag:


// **************************************************
// CAPTURE: team_WOLF_checkpoint = flag
// flag 1
scr_KOTH_FLAG_1
{
	spawn
	{
		// ...
		setstate neutral_FLAG_1_toi default
		setstate allied_FLAG_1_toi invisible
		setstate axis_FLAG_1_toi invisible

		// ...
	}

	trigger axis_capture
	{
		// ...

		setstate neutral_FLAG_1_toi invisible
		setstate allied_FLAG_1_toi invisible
		setstate axis_FLAG_1_toi default

		// ...
	}

	trigger allied_capture
	{
		// ...

		setstate neutral_FLAG_1_toi invisible
		setstate allied_FLAG_1_toi default
		setstate axis_FLAG_1_toi invisible

		// ...
	}
}
// **************************************************

The problem is the following:
In limbo menu when the mouse is near the flags / flagpoles there are two flags:

How can I get rid of the second flag?
I have tried already to work with only one TOI and one CM-marker for the neutral flag.
And have set only the neutral CM marker invisibible.
But this doesn’t work at all.
The flags have been marked as captured from the beginning (strange).

Many thanks in advance.

EDIT:
Here are the entities for one flag:

  1. [li]“team_WOLF_objective”
    [/li]
    { "classname" "team_WOLF_checkpoint" "origin" "0 0 -232" "model" "models/multiplayer/flagpole/flagpole.md3" "scriptname" "scr_KOTH_FLAG_3" }

    [li]allied TOI + allied CM-marker (axis and neutral corresponding)
    [/li]
    // entity { "spawnflags" "3" "customimage" "gfx/limbo/cm_flagallied.tga" "classname" "trigger_objective_info" "targetname" "allied_FLAG_3_toi" "scriptname" "scr_allied_FLAG_3_toi" "track" "the Flag 3" "shortname" "Flag 3" "target" "allied_FLAG_3_cm_marker" // brush 0 { ( -64 64 -96 ) ( -64 -64 -96 ) ( -64 -64 -112 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0 ( 56 64 -96 ) ( -56 64 -96 ) ( -56 64 -112 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0 ( 64 -64 -96 ) ( 64 64 -96 ) ( 64 64 -112 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0 ( -56 -64 -96 ) ( 56 -64 -96 ) ( 56 -64 -112 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0 ( -56 -64 -96 ) ( -56 64 -96 ) ( 56 64 -96 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0 ( 64 64 -240 ) ( -48 64 -240 ) ( -48 -64 -240 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0 } // brush 1 { ( -8 8 -72 ) ( -8 -8 -72 ) ( -8 -8 -216 ) common/origin 0 0 0 0.500000 0.500000 0 15 0 ( 8 8 -72 ) ( 0 8 -72 ) ( 0 8 -216 ) common/origin 0 0 0 0.500000 0.500000 0 15 0 ( 8 -8 -72 ) ( 8 8 -72 ) ( 8 8 -216 ) common/origin 0 0 0 0.500000 0.500000 0 15 0 ( 0 -8 -72 ) ( 8 -8 -72 ) ( 8 -8 -216 ) common/origin 0 0 0 0.500000 0.500000 0 15 0 ( 0 -8 -72 ) ( 0 8 -72 ) ( 8 8 -72 ) common/origin 0 0 0 0.500000 0.500000 0 15 0 ( 16 8 -88 ) ( 8 8 -88 ) ( 8 -8 -88 ) common/origin 0 0 0 0.500000 0.500000 0 15 0 } } // entity { "targetname" "allied_FLAG_3_cm_marker" "origin" "0 0 -56" "classname" "misc_commandmap_marker" }

(Java.Lang) #2

If the way I am looking at it is correct, and all of your flag_1 entities are stacked, the way you have done it, you probably don’t have just two entities there, but three.

According to your script you have three toi’s visible.


(nUllSkillZ) #3

No, there’s only one TOI default.
The other two are set invisible.
Hmm, had the idea to delete the customimages of the TOI’s.


(SteelRat) #4

You may need to add a wait 50 to the spawn section.


(nUllSkillZ) #5

These flags are no respawnflags.

EDIT
Oops, sorry for misunderstanding.
I have a wait at beginning of spawn-scriptblock.


(SteelRat) #6

It needs to be in the spawn section of scr_KOTH_FLAG_1 with a value from 50 to 200 or so, just to allow things to settle down after spawn. It should be at the start of the spawn section before your setstates.


(nUllSkillZ) #7

I have a wait in there but I haven’t mentined it:


scr_KOTH_FLAG_1
{
	spawn
	{
		wait 100
		setstate neutral_FLAG_1_toi default
		setstate allied_FLAG_1_toi invisible
		setstate axis_FLAG_1_toi invisible

		setstate ALLIED_FLAG_1_mover invisible
		setstate AXIS_FLAG_1_mover invisible
		setstate NEUTRAL_FLAG_1_mover default
	}

	trigger axis_capture
	{
		wm_objective_status 1 0 1
		wm_objective_status 1 1 2

		wm_announce "The Axis have captured Flag 1"

		alertentity TIMER_AXIS_FLAG_1

		trigger game_manager ALLIED_checkgame_flag_1_sub

		trigger game_manager AXIS_setbit_objective_priority_type_5
		trigger game_manager Setbit_Flag_1
		trigger game_manager AXIS_checkgame

		setstate neutral_FLAG_1_toi invisible
		setstate allied_FLAG_1_toi invisible
		setstate axis_FLAG_1_toi default

		setstate ALLIED_FLAG_1_mover invisible
		setstate AXIS_FLAG_1_mover default
		setstate NEUTRAL_FLAG_1_mover invisible
	}

	trigger allied_capture
	{
		wm_objective_status 1 0 2
		wm_objective_status 1 1 1

		wm_announce "The Allied have captured Flag 1"

		alertentity TIMER_ALLIED_FLAG_1

		trigger game_manager AXIS_checkgame_flag_1_sub

		trigger game_manager ALLIED_setbit_objective_priority_type_1
		trigger game_manager Setbit_Flag_1
		trigger game_manager ALLIED_checkgame

		setstate neutral_FLAG_1_toi invisible
		setstate allied_FLAG_1_toi default
		setstate axis_FLAG_1_toi invisible

		setstate ALLIED_FLAG_1_mover default
		setstate AXIS_FLAG_1_mover invisible
		setstate NEUTRAL_FLAG_1_mover invisible
	}
}


(SteelRat) #8

ok, sorry then. It seems to relate to the cm markers but I am unsure.
What differs that first flag from the rest in your mapfile?

My guess is that you have both a wolf_objective_info as well as a cm_marker very close at the first flag, I may be wrong though.


(nUllSkillZ) #9

The "team_WOLF_objective"entities (the spawnpoints) are on the left and the right side of the map (the allied one is shown in the picture).
The flags are surrounded by “trigger_objective_info”-entities with “misc_commandmap_marker”-entities.

Hmm, may be I should delete the cm-markers.


(Java.Lang) #10

That would be my suggestion.


(nUllSkillZ) #11

Deleted the customimage of one flag:
If it’s captured I get the black/orange-texture

Deleted the cm-marker of one flag:
The “captured” flag isn’t shown at all.

EDIT:
I’ve also changed the spwnflags.
Changed it to “0”: No flag is visible at all.
Changed it to “is_objective”: No flag is visible at all.

EDIT2:
I think I know what the problem is.
The flags are are shown as respawnflags (because of the “team_WOLF_objective”-entities).
That are the icons that doesn’t change the size.
And they are shown as objectives (because of the TOI’s + CM-marker’s).
That are the icons that change the size.

To work around this I have to use the flags as model’s and some kind of trigger.
Or to delete the TOI’s + CM-marker’s.

EDIT3:
I have deleted the TOI + cm-marker: Flag is not shown in limbo.