flag1
{
spawn
{
accum 1 set -1
}
trigger axis_capture // flag has been touched by an Axis player
{
accum 1 abort_if_not_equal -1 // flag owned by someone, then abort.
accum 1 set 0 // Axis own the pole
wm_announce "Axis capture the flag 1!"
//alertentity flag1spawns
alertentity flag1area
globalaccum 0 abort_if_greater_than 0 // atleast flag number 1 already taken, abort
globalaccum 0 set 1
wait 500
setautospawn "Flag 1" 0
setautospawn "Flag 1" 1
}
trigger allied_capture // flag has been touched by an allied player
{
accum 1 abort_if_not_equal -1 // flag owned by someone, then abort.
accum 1 set 1 // Allies own the pole
wm_announce "Allies capture the flag 1!"
//alertentity flag1spawns
alertentity flag1area
globalaccum 0 abort_if_greater_than 0 // atleast flag number 1 already taken, abort
globalaccum 0 set 1
wait 500
setautospawn "Flag 1" 0
setautospawn "Flag 1" 1
}
trigger kill
{
remove
}
}
I have the entities setup as follows
FlagPole
classname = team_WOLF_checkpoint
scriptname = flag1area
targetname = flag1area
target = Flag 1
spawnflags = 1
Objective Above Pole
classname = team_WOLF_objective
scriptname = flag1area
description = Flag 1
Axis Flag 1 Spawnbox
classname = team_CTF_redspawn
scriptname = Flag 1
targetname = Flag 1
The accume should add 1 as you go along and be checking so that you spawn at the next flag but something isnt right and im not sure what. Can anyone help?[/b]
