OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Killzone on 22 Sep 2003, 02:16:53
-
Is it possible to have a script that detect when your injured and automatically transports you to another spot on the map where you can get healed?
Thanks in advance
-
Sure.. it would be unrealistic of course.. but totally doable..
repeatable trigger:
condition: unit getdammage > x
activation: unit setpos [getpos g1 select 1, getpos g1 select 0,0]
now in the above example:
unit = player's name
x= value between 0 and 1.0 (0 being uninjured and 1.0 being 100% injured or dead)
g1= gamelogic placed where you want the unit to be teleported to.
the above condition will fire when the dammage level has surpassed x
sending the named unit instantly to the gamelogic.
:cheers:
-
Thanks a lot.
Although I know it is unrealistic. I don't want a "GOD" code (I hate god codes) I was thinking of battlefield 1942 how when dead you respawn as reinforcements so that you can join the battle again. ;D