OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: fragsta on 24 May 2003, 21:40:21
-
When you want to make a particular object damaged more when something happens, how do you do it? I want it so that if something is destroyed it will affect something else's health, but not quite kill it. I could just make it so that it sets the damage with setdammage, but what if the thing i want to be damaged is already destroyed? It would have a reverse effect. So is there a way of adding damage onto something? such as
setdammage +0.2or something?
Thanx in advance!
-
_Unit setdammage (getdammage _Unit)+0.2
Command combination... very useful! ;)
-
You can add a conditonal statement to ensure that _unit isn't killed. For example, before Komuna's line have
? getdammage _unit > 0.7: _unit setdammage 0.7
so the adding of 0.2 of dammage will not kill _unit.
-
kewl, thanks alot guys!