Jump to content
Sign in to follow this  
Hossus

Passing vehicle name ??

Recommended Posts

hi

i am using the ingame respawn moudle and i want to pass the name of my vehicle after it respawned . (ex. car1) .

i guess i have to put something in the expression field of the moudle . but what can't find anything

Please help

thx

Share this post


Link to post
Share on other sites

I think variable names applied to vehicles in the editor are persistent, even through respawn, if I'm wrong, in the expression field of the respawn module put:

(_this select 0) setVehicleVarName (vehicleVarName (_this select 1))

Share this post


Link to post
Share on other sites

When you say name of the vehicle, do you actually mean name of the variable that contains the vehicle object?

Share this post


Link to post
Share on other sites

The BIS respawn module function already does it via BIS_fnc_ObjectVar. Which is a quite useful function for setting a var name and syncing it across the network.

Share this post


Link to post
Share on other sites

ok guys first off all thx

my english sucks

i will try to explain this .

so i am trying to use Generic Vehicle Service Script http://www.armaholic.com/page.php?id=19735 but it only works the first time, but after the vehicle respawned it just dont work

i was guessing it is because of the name

lol get it????

sorry guys

:confused:noobking:confused:

Share this post


Link to post
Share on other sites

You can use the method BIS uses...

something like this, using their function

// returns varName if it has one, or assigns one if not
_oldVar = _oldVic call BIS_fnc_objectVar; 

deleteVehicle _oldVic; // from your script

_newVic = createVehicle [/* code */]; // from your script

// assigns _newVic the same var names as _oldVic
_newVar = [_newVic,_oldVar] call BIS_fnc_objectVar;

but the problem may be that the script is not running again for the new vehicle

_newVic = createVehicle [/* code */]; // from your script
_script = [_newVic] execVM "respawnScript.sqt";

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  

×