OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: tcp on 29 Aug 2009, 05:06:13
-
Is it possible to use a integer to call a variable name such as IED1tr, IED2tr, etc. so that when _num=2 something like ("IED"_num"tr") could be interpreted as a variable name instead of a string?
-
_left_Ve_1 = 0;
// Following executes _left_ve_1=2
call compile format["_left_ve_%1=%2", 1, 2];
hint str _left_ve_1;
-
Thank you. I needed a trigger activated variable to be random so my script could be ran on different objects. This should work. However, how would I get the unique ID on the object (vehicle) that executed the script if I already passed this through the init line?