Jump to content
Sign in to follow this  
jpinard

Spawn Insurgent BRDM-2 after 5 minutes

Recommended Posts

I've looked at all the major "spawn" threads and nothing fits this in simplicity.

Is there a way to place a unit in my missions, then add an initialization command so it won't show up until 5 minutes after the battle starts?

Or do I have to create a real trigger & script for this?

Thanks! :)

Share this post


Link to post
Share on other sites

Solution A:

Place the BRDM wherever you want,

Vehicle Condition of presence:

spawnBrdm

Place a logic anywhere.

Logic initialization:

nullReturn = [] Spawn {sleep (60*5); spawnBrdm = true};

Quick note: Spawn is used so we can pause the execution. a sleep cannot be used in an initialization field without a spawn.

Solution B:

Place a logic wherever the vehicle shall be,

Logic initialization:

nullReturn = [this] Spawn {sleep(60*5);_veh = "BRDM2_INS" createVehicle getPos (_this select 0);_veh setDir direction (_this select 0);_veh setVelocity [0,0,-1]};

Share this post


Link to post
Share on other sites

Benny, what does "place a logic anywhere" mean? I put a trigger down and change the activation to game logic then

nullReturn = [] Spawn {sleep (60*2); spawnBrdm2 = true};

but it won't spawn.

Share this post


Link to post
Share on other sites

AFAIK condition of presence is only checked during mission initialization (even before init.sqf runs and even before some unit name variables are defined), which makes it quite useless.

Best thing (both for easiness of implementation and for realism/immersion) is to place the BRDM in the mission from the start, give it a waypoint next to its starting location and a 2nd one where you want it to go after 5 minutes. Synchronize the first waypoint to a simple trigger that has time>300 in its condition field (instead of this), which will make the BRDM stay at that waypoint for the first 5 minutes of the mission and only later on proceed to the next.

Alternatively, you can just use UPSMON, which can let you do these kinds of things in even more logical and realistic ways (rather than the predictable "BRDM goes to point X exactly 5 minutes after mission starts).

Share this post


Link to post
Share on other sites

1. Place the BRDM2.

2. Put the following in its init line.

0 = _this spawn {_pos = getposatl _this;_this setposatl [0,0,0];sleep (60*5);_this setposatl _pos};

Instead of [0,0,0], a position on land where the thing can stay for 5 minutes could be used, even:

getmarkerpos "mybrdm2tempmarker"

Would suffice.

Hope that helped.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×