Jump to content

Sign in to follow this  
lanmancz

Unit spawn trigger

Recommended Posts

Hey,

I'd like to know how to setup a triger to spawn an empty vehicle on my base for my coop multiplayer mission. I don't want that vehicle there right after mission start - I want new vehicles to be available after completing objectives. When the trigger is activated a new empty vehicle should be spawned and also respawned if the vehicle is destroyed later by the enemy in combat (I already have a script for that - "simple vehicle respawn"). Anyone got any ideas how to do that ?

Share this post


Link to post
Share on other sites

use createVehicle array for empty vehicles, spawnGroup is for "creating groups of units"...

_veh = createVehicle ["ah1w", getMarkerPos "mybaseMarker", [], 0, "NONE"];
veh = [_veh] execVM "vehicle.sqf";

edit: and now just run the simple vehicle respawn script on this vehicle:

instead of vehiclename you now use _veh

Edited by Demonized

Share this post


Link to post
Share on other sites

Yeah, what he said... I posted that link to the wrong thread! I just discovered the functions module and "spawnunit" and "spawngroup" last night, wanted to share :)

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  

×