Home   Help Search Login Register  

Author Topic: 1) count units 2)speed of missile  (Read 485 times)

0 Members and 1 Guest are viewing this topic.

bored_onion

  • Guest
1) count units 2)speed of missile
« 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

Offline Mud_Spike

  • Contributing Member
  • **
Re:1) count units 2)speed of missile
« Reply #1 on: 25 Aug 2004, 13:40:01 »
1) To count the number of alive units in an array do:
Code: [Select]
nrAlive = "alive _x" count myUnitArraywhere 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.


bored_onion

  • Guest
Re:1) count units 2)speed of missile
« Reply #2 on: 25 Aug 2004, 16:40:39 »
problem solved

thanks!