Jump to content
Sign in to follow this  
Fox '09

How do I make a helicopter invincible to water?

Recommended Posts

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

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

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

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

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

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

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 by Fox '09

Share this post


Link to post
Share on other sites

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

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

I'll see what I can do about height. Thanks

Share this post


Link to post
Share on other sites

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×