well so back when making my capturable spawn i couldnt make it work as in the 2bit tutorial
so i said screw this and i made the script by my own:
i have a team_wolf_checkpoint
targetname: flagpole1
spawnflags: spawnpoint
scriptname: cp1
and a team_wolf_objective
target: flagpole1
targetname: forward_wobj
description: axis shore spawn
no spawnflags.
the checkpoint is not pointing to any flags, but i have redspawn and bluespawn with targetname theflaga and theflagb (allied and axis) and they get triggered by script
then i added this script
cp1
{
spawn
{
accum 0 set 2 // 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 cp1 axis_reclaim // Reclaimed from Allies
accum 0 set 0 // Axis own the flag
wm_announce "Axis have captured the axis shore spawn Flag!"
setstate forward_wobj default
alertentity theflaga
setautospawn "axis shore spawn" 0
}
trigger axis_reclaim
{
alertentity forward_wobj // Switch command map marker
alertentity theflagb
}
trigger allied_capture // Touched by an allied player
{
accum 0 abort_if_equal 1 // do Allies own flag?
accum 0 trigger_if_equal 0 cp1 allies_reclaim
accum 0 set 1 // Allied own the flag
wm_announce "Allies have captured the axis shore spawn Flag!"
setstate forward_wobj default
alertentity forward_wobj // Switch command map marker
alertentity theflagb
setautospawn "axis shore spawn" 1
}
trigger allies_reclaim
{
alertentity forward_wobj // Switch command map marker
alertentity theflaga
}
}
i was pretty happy with it, in fact worked perfectly; so i cloned the thing and i added a second capturable spawn
cp2
{
spawn
{
accum 0 set 2 // 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 cp1 axis_reclaim // Reclaimed from Allies
accum 0 set 0 // Axis own the flag
wm_announce "Axis have captured the island main spawn Flag!"
setstate forward_wobj2 default
alertentity theflaga2
setautospawn "central spawn" 0
}
trigger axis_reclaim
{
alertentity forward_wobj2 // Switch command map marker
alertentity theflagb2
}
trigger allied_capture // Touched by an allied player
{
accum 0 abort_if_equal 1 // do Allies own flag?
accum 0 trigger_if_equal 0 cp1 allies_reclaim
accum 0 set 1 // Allied own the flag
wm_announce "Allies have captured the island main spawn Flag!"
setstate forward_wobj2 default
alertentity forward_wobj2 // Switch command map marker
alertentity theflagb2
setautospawn "central spawn" 1
}
trigger allies_reclaim
{
alertentity forward_wobj2 // Switch command map marker
alertentity theflaga2
}
}
this worked great also;
but now i need to have a third spawn by capturable flag, so when i add another instance of the same code/entities with the numbers 3 (eg: theflaga3, theflagb3, forward_wobj3) it doesnt work right;
the Allied reclaim is messed up only in this 3rd spawn, allies reclaim the flag but axis can still spawn there
this is making me scratch my head
do you have any advice?
doesn’t make any sence in my mind… Wouldn’t that just switch it from axis, to allies, back to axis?