Jump to content
Sign in to follow this  
Lineman

[Help] Create Variable Name for Spawned Object

Recommended Posts

Currently using createVehicle to spawn an object under certain conditions. I'm wondering how to create a variable name once it has spawned.

Share this post


Link to post
Share on other sites
2 hours ago, stanhope said:

CreateVehicles returns the created object.  So you can just do this:

_vehicle = type createVehicle position;

_vehicle = createVehicle [type, position, markers, placement, special];

(https://community.bistudio.com/wiki/createVehicle)

 

Or you can use https://community.bistudio.com/wiki/setVehicleVarName

It works! Thanks!

 

//Blufor Present Trigger

On activation field:

[]execVM "MoveAttackPoint01.sqf";

 

//MoveAttackPoint01.sqf
 

Spoiler

 

if !(isServer) exitWith {};

waitUntil {triggerActivated MoveAttackPointTrigger01};
for "_i" from 1 To 1 do {
deleteVehicle SPAWNFLAG01;
sleep 3;
SPAWNFLAG01 = "FLAG_GREEN_F" createVehicle getMarkerPos "NEWATTACKPOS01";
};

 

 

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  

×