OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bored_onion on 25 Aug 2004, 12:01:54
-
1) i know there is a way to return the number of units left out of a certain number using the count command but i cant get it to work. could someone please tell me what i should do to return the number of units remaining out of 5 so that i can call a hint to tell the player how many are left?
2) ive just managed to get a missile camera to work that follows a missile in the air. i think it would be a nice touch if it calculated and displayed the speed of the missile using the speed and format commands. i tried this and couldnt get it to work, has anyone managed it or can anyone tell me how?
thanks a lot ;D
-
1) To count the number of alive units in an array do:
nrAlive = "alive _x" count myUnitArray
where myUnitArray is something like:
'[unit0,unit1,unit2]', or 'units group player', 'thislist', 'list myTrigger' or whatever.
2) Check the 'velocity' command, it returns the speed vector of an object/vehicle.
Depending on how the missile is made, it might not work, but thats where you wanna start digging anyway.
Syntax not guaranteed.
-
problem solved
thanks!