Home   Help Search Login Register  

Author Topic: Hide Body  (Read 454 times)

0 Members and 1 Guest are viewing this topic.

SEAL_Sniper

  • Guest
Hide Body
« on: 20 Jun 2003, 00:49:25 »
Searched, but no answer...

How can a script search for dead bodies, if dead, detect if it's hidden?  Also, is it possible to have AI units hide bodies that they come across?

borrowed soap

  • Guest
Re:Hide Body
« Reply #1 on: 20 Jun 2003, 01:32:12 »
2nd?  lustypoohs comm ref says  STR_ACTION_HIDE_BODY, so i am thinking   unit action ["HIDE_BODY","deadBody"], but that may only b close.
1st snYpir's killer isbodyhidden script is very useful for determing whether another unit is a) close enough to the deadBody to see it and b) whether the body has been buried (and even if it has, has it been buried deep enough)
this is totally based on snYpirs script, with the addition of the ten second timer at the end to allow the player to kill the searchingUnit before he can set off the alarm. closedis is whatever u call for, with 30 being a fairly good start (assuming a clear day with sunlight. choppers i set for 50 or so, etc)

_deadBody = _this select 0
_searchingUnit = _this select 1
_closedis = _this select 2

#loop

? NOT(alive _searchingUnit) : goto "end"

? NOT(alive _deadBody) AND (_deadBody Distance _searchingUnit) < _closedis AND (GetPos _deadBody select 2) > -0.5 : goto "alarm"

~1

goto "loop"

#alarm
~10
? NOT(alive _searchingUnit) : goto "end"
alarmRaised = true

#end
exit