Spawn question regarding time and then captured for good


(twt_thunder) #1

So I am gonna have spawnpoints that allied can win one by one .
The thing is I want it to be as this: When allied held spawn for 5min it will be theirs for rest of game. But before that they will have to fight for it.
Could someone with the scripting knowledge help me out here?

here’s one of the scripts, could someone post it in whole with changes, would be very grateful :smiley:

spawnlittlevillage
{
    trigger remove
    {
        remove
    }
}
//team_WOLF_objective
// accum 0: team    (0=axis, 1=allies, -1=none)
spawnpointlittlevillage
{
    spawn
    {
        wait 100
        accum 0 set 0
    }
    trigger show
    {
        setstate spawnpointlittlevillage default
        setstate spawnlittlevillage default
        setstate spawnflaglittlevillage default
    }
    trigger hide
    {
        setstate spawnpointlittlevillage invisible
        setstate spawnlittlevillage invisible
        setstate spawnflaglittlevillage invisible
    }
    trigger force_axis
    {
        accum 0 abort_if_equal 0
        accum 0 set 0
        wm_announce "^5little_village is forced Axis.."
        alertentity spawnpointlittlevillage        //commandmap
        alertentity spawnlittlevillage                //swap spawning team
        setautospawn "little_village" 0            //use the spawnpoint
    }
    trigger force_allied
    {
        accum 0 abort_if_equal 1
        accum 0 set 1
        wm_announce "^5little_village is forced Allied.."
        alertentity spawnpointlittlevillage        //commandmap
        alertentity spawnlittlevillage                //swap spawning team
        setautospawn "little_village" 1            //use the spawnpoint
    }
    trigger set_none
    {
        accum 0 set -1
    }
    trigger set_axis
    {
        accum 0 set 0
    }
    trigger set_allied
    {
        accum 0 set 1
    }
    trigger remove
    {
        trigger spawnlittlevillage remove
        trigger spawnflaglittlevillage remove
        setstate spawnpointlittlevillage invisible
        remove
    }
}
//team_WOLF_checkpoint
// accum 0: team    (0=axis, 1=allies, -1=none)
spawnflaglittlevillage
{
    spawn
    {
        wait 100
        accum 0 set 0
    }
    trigger axis_capture
    {
        trigger self first_touch
        trigger self touch_axis
    }
    trigger allied_capture
    {
        trigger self first_touch
        trigger self touch_allied
    }
    trigger touch_axis
    {
        accum 0 abort_if_equal 0
        accum 0 set 0
        wm_announce "^5The flag at \'little_village\' is touched by Axis.."
        trigger spawnpointlittlevillage set_axis
    }
    trigger touch_allied
    {
        accum 0 abort_if_equal 1
        accum 0 set 1
        wm_announce "^5The flag at \'little_village\' is touched by Allies.."
        trigger spawnpointlittlevillage set_allied
    }
    trigger first_touch
    {
        accum 0 abort_if_equal -1
        trigger spawnpointlittlevillage show
    }
    trigger show
    {
        setstate spawnflaglittlevillage default
    }
    trigger hide
    {
        setstate spawnflaglittlevillage invisible
    }
    trigger remove
    {
        setstate spawnflaglittlevillage invisible
        remove
    }
}



#2

Look at the generator of seawall battery, it waits one second, looks if its still broken and repeat til it opening the doors
Use accums and wait

Wait 5000
Accum 1 abort if equal 2

And repeat this 12 x 5 times
50 + 2 x 5
60times :slight_smile:

:smiley: have fun :smiley:


#3

Actually if the germans capturing the flag now and a allied capture it 2sec later the 5min count down will not stop
So the flag must be noncapture able 5,1 secs after the germans/axis has capture it

If you wanna make a smaller/finer tuning

Use

Wait 2500
Accum 1 abort if equal 2

120 times in a row :smiley:
Your script may be long :rolleyes:


#4

Okey the accums i wrote wasnt related to your script
Just as an example more…


(twt_thunder) #5

ok… dont worry ove… growing an idea in my head :smiley:
just thought there might be on who have done this before and was willing to share :smiley:


(Mateos) #6

Look at 2Bit’s Berlin. Or 2Bit’s Cluedo :slight_smile: