Fox '09 14 Posted May 15, 2010 Hi all, I was wondering if it was possible to disable water damage within the editor. A quick search didn't find anything... any ideas? thanks Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 You could do... this setDamage false; That would disable ALL incoming damage to the vehicle. Not sure if it's possible to limit the invincibility to only water though... Share this post Link to post Share on other sites
Fox '09 14 Posted May 15, 2010 thanks! I'll give that a try. Perhaps I'll create a trigger or something that if the heli is less than 3 meters it will not take damage, as a temporary solution Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 Sounds like a good plan to me! Remember though, the trigger's condition is only checked ~twice per second. So if you're heading towards the ground fast you might just miss the check and crash anyway! :D Share this post Link to post Share on other sites
Fox '09 14 Posted May 15, 2010 I guess it'll take some tuning. Also, False doesn't work, unless I'm doing something wrong.. It said "Type any, expected object" I tried with naming it heli1 and "heli1 setdamage false;" but got the same result. edit: it is in the init, is this the right place? same result for the trigger onactivation Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 Oh my god I'm sorry! setDamage is for DAMAGING vehicles. 1 = Completely Destroyed and 0 = Completely Unharmed. The one you want is allowDamage! God I'm sorry! :D this allowDamage false; That should work! :D Share this post Link to post Share on other sites
Fox '09 14 Posted May 15, 2010 (edited) hehe, thanks :) I'll report back if I get it to work (the trigger..) edit: I am awful at triggers, no luck here :( I have checked these here, http://community.bistudio.com/wiki/getPosASL http://community.bistudio.com/wiki/PositionASL but I can't really figure out how to activate the trigger if the height is 10/5 meters above sea level Edited May 15, 2010 by Fox '09 Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 Cool cool - good luck! :P Share this post Link to post Share on other sites
Fox '09 14 Posted May 15, 2010 edited as soon as you posted :( anyway, allowdamage doesn't seem to keep it from exploding on contact with the water.. but it appears to keep it from exploding while it is in the water. I might want it to stay intact if speed is <50 Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 15, 2010 I know you'd be able to fetch it's speed by doing something like: //Condition speed HELONAME < 50 //Activation HELONAME allowDamage false; Not sure about height though... Share this post Link to post Share on other sites
Fox '09 14 Posted May 16, 2010 I'll see what I can do about height. Thanks Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 16, 2010 Could try this: http://www.ofpec.com/ed_depot/index.php?action=details&id=358&game=OFP ---------- Post added at 03:18 ---------- Previous post was at 03:03 ---------- Could also try this: http://community.bistudio.com/wiki/unitsBelowHeight Share this post Link to post Share on other sites
Andy455 11 Posted May 16, 2010 For height you would use (getPosASL heli1 select 2) because (getPosASL heli1) will return an array of: [X (left - right) co ordinate of heli1, Y (forward - backward) co ordinate of heli1, Z (up - down) co ordinate of heli1] and you only want to get the HEIGHT (Z) of the object you use select 2 to get the third element of the array. Share this post Link to post Share on other sites
Fox '09 14 Posted May 17, 2010 thanks, I'll give it a shot. I make make it dependent on both speed and altitude, because I'm sure if a helicopter hit water at a high enough velocity it would kill the crew/get smashed up Share this post Link to post Share on other sites
Fuzzy Bandit 10 Posted May 17, 2010 Yeh helicopters coming in to land and hitting the water kills people, so I'm sure it going at some pace and doing it would blow you up! :D Let us know how it goes! Share this post Link to post Share on other sites