Jump to content
XOSPECTRE

Create vehicle during mission whith name

Recommended Posts

Hello..

I'm working on CTI with atomic bomb but I need to create vehicles with name I mean how to spawn for example car with some name, im using this:

 

    _Autonomous  = "I_UAV_02_F" createVehicle [24068.07,18587.05,3.19]; I will be appreciated if someone got any idea THX.

Share this post


Link to post
Share on other sites

Hey there! This should do it!

 

 _Autonomous  = createVehicle ["I_UAV_02_F", [24068.07,18587.05,3.19] , [], 0, "NONE"];

 _Autonomous setIdentity "uavName";
 _Autonomous setVehicleVarName "uavName"; uavName =  _Autonomous;

 

dubl

  • Like 1

Share this post


Link to post
Share on other sites

Awesome thankx a lot thedubl.. and how to create vehicle whith some direction for exampple setdir 180  but whith the same scrip .

 

 _Autonomous  = createVehicle ["I_UAV_02_F", [24068.07,18587.05,3.19] , [], 0, "NONE"];

Share this post


Link to post
Share on other sites

 

 

Awesome thankx a lot thedubl.. and how to create vehicle whith some direction for exampple setdir 180  but whith the same scrip .

 

 _Autonomous  = createVehicle ["I_UAV_02_F", [24068.07,18587.05,3.19] , [], 0, "NONE"];

_autonomous setDir 180;

Share this post


Link to post
Share on other sites

Please do not spread misinformation. Identity is a class for use with units https://community.bistudio.com/wiki/setIdentity

It was only a mistake. I was typing not thinking.

 

Corrected:

 _Autonomous  = createVehicle ["I_UAV_02_F", [24068.07,18587.05,3.19] , [], 0, "NONE"];

 _Autonomous setVehicleVarName "uavName"; uavName =  _Autonomous;

Share this post


Link to post
Share on other sites


fnc_setVehicleName =

{

params ["_veh", "_name"];

missionNamespace setVariable [_name, _veh, true];

[_veh, _name] remoteExec ["setVehicleVarName", 0, _veh];

};

//example

_veh = createVehicle ["I_UAV_02_F", [24068.07,18587.05,3.19], [], 0, "NONE"];

[_veh, "uavName"] call fnc_setVehicleName;

  • Like 3

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

×