Jump to content
Sign in to follow this  
thdman1511

Is it possible to spawn vehicles on a trigger

Recommended Posts

I am designing a mission for Arma 3. I am just wondering whether or not its possible to spawn the vehicle after the start of the mission. The scenerio is that a Squad is sent into a base the check to see if any enemy forces are present, once the base has be cleared, the Squad leader Send in a Radio call the let the Helicopters who are hover out at sea, that its clear to land. I have got that part working well.

What I also want to do is have several vehicle spawn at the time that the helicopters land or at a time the squad leader send another radio signal to signal the spawn of vehicle. Is that possible to do without a script or will I need to learn how to write a script for it.

Any assistance with this would be appreciated.

Share this post


Link to post
Share on other sites

Yes, create a trigger (either radio if you want the SL to request) or with a condition that when the helo enters. Then in the on act code of the trigger you can use isServer (if multiplayer) and the createVehicle command to spawn a vehicle. You can do all of this inside the triggers field and do need an external script.

Share this post


Link to post
Share on other sites

Thankyou for your replay.

Could you direct me to a sample script that will help me learn to write the script for my mission above.

I have print off, scripting commands for Create Vehicle and associated commands, but would like a guide to use them.

Share this post


Link to post
Share on other sites
Thankyou for your replay.

Could you direct me to a sample script that will help me learn to write the script for my mission above.

I have print off, scripting commands for Create Vehicle and associated commands, but would like a guide to use them.

Create an empty marker on the map and name it Spawnpoint, then create a trigger on the map Acivated by BluFor and Once, and then on the [On Act] put

_quad ="B_Quadbike_F" createVehicle (position Spawnpoint);

Or whatever vehicle you wish to spawn.

Share this post


Link to post
Share on other sites
Create an empty marker on the map and name it Spawnpoint, then create a trigger on the map Acivated by BluFor and Once, and then on the [On Act] put

_quad ="B_Quadbike_F" createVehicle (position Spawnpoint);

Or whatever vehicle you wish to spawn.

Say if you wanted that Quad to have some men driving it, how would you do that? I'm trying to spawn a Ifrit HMG off this but with men inside it. I got the vehicle to spawn with this

_car ="O_Ifrit_MG_F" createVehicle (position Spawnpoint);

yet noone inside it, I used search and could not find it. This is my first post because I have looked far and wide for it.

Share this post


Link to post
Share on other sites
Say if you wanted that Quad to have some men driving it, how would you do that? I'm trying to spawn a Ifrit HMG off this but with men inside it. I got the vehicle to spawn with this

_car ="O_Ifrit_MG_F" createVehicle (position Spawnpoint);

yet noone inside it, I used search and could not find it. This is my first post because I have looked far and wide for it.

for that you need http://community.bistudio.com/wiki/createUnit

Share this post


Link to post
Share on other sites

The problem with createunit is you'd then have to use moveindriver to get the spawned unit to get in the vehicle as the driver. And what if the spawned vehicle had weapons, you'd then need to spawn 2 units, 1 to drive, and the other to moveinGunner to man the gun.

I'd use something like this to create a vehicle ready to go with crew and all.

_Ifrit1 = [getMarkerPos "Spawnpoint", 90, "O_Ifrit_MG_F", EAST] call bis_fnc_spawnvehicle;

N.B 90 in the above statement is the direction the vehicle will be pointing. Adjust it to suit.

Share this post


Link to post
Share on other sites

thanks beerkan, will get back to you

---------- Post added at 05:54 ---------- Previous post was at 05:36 ----------

The problem with createunit is you'd then have to use moveindriver to get the spawned unit to get in the vehicle as the driver. And what if the spawned vehicle had weapons, you'd then need to spawn 2 units, 1 to drive, and the other to moveinGunner to man the gun.

I'd use something like this to create a vehicle ready to go with crew and all.

_Ifrit1 = [getMarkerPos "Spawnpoint", 90, "O_Ifrit_MG_F", EAST] call bis_fnc_spawnvehicle;

N.B 90 in the above statement is the direction the vehicle will be pointing. Adjust it to suit.

works perfectly, thanks

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  

×