Home   Help Search Login Register  

Author Topic: How do I retrieve the name of the last alive unit?  (Read 681 times)

0 Members and 1 Guest are viewing this topic.

EFileTahi-A

  • Guest
How do I retrieve the name of the last alive unit?
« on: 26 Oct 2002, 18:26:35 »
Like:

I have a group of five man. I want to make a script which will give me the name of the last dieing soldier...

So that name can be used to get its coordenates for a camera which will focus him and make a slow motion dieing scene with the "setacctime"

In theory I guess its something like this:

------------------------------------------------------------
#ini_loop

;Checking when only 1 soldier is alive of a target group:
;if its true goto "END"

else

goto "ini_loop"

#END

;Wait until he dies
Hint "All members are dead"
   
_pos=getpos This_would_be_the_last_dieing_soldier
_camera="camera" camcreate[_pos select 0, _pos select 1, (_pos select 2) + 3.5 ]
_camera cameraEffect ["EXTERNAL","TOP"]
_camera camSettarget This_would_be_the_last_dieing_soldier
_camera camCommit 0.01

~5

exit
------------------------------------------------------------
Just a good "cheking how namy soldiers alive of a target group" couting script would be very nice!

Sorry 4 my bad english...

Tks to all!

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:How do I retrieve the name of the last alive unit?
« Reply #1 on: 27 Oct 2002, 06:24:59 »
EFileTahi-A,

Please choose one forum to post your question in. Rest assured, if it's in the wrong place a friendly admin will move it for you ;)

All replies to this post to here.

# Topic Locked