Forum Jump :

Author Message


Posts: 34
Rank:


Level: Member

Country: us
Location: Wisconsin
Occupation: Graphic Artist
Age: 33
In-game name: ={ZRT}= Peter

 
#1 Posted at 2012-10-21 23:54        
     
Ok so I have a helicopter flying over a forest when out of nowhere a missle strikes it. Sometimes causing enough damage to bring it down, Other times its almost like the missle tickled it. So I want to set up a trigger that checks to see if the Helicopter took any damage. So when the trigger see's there has been damage it causes enough damage to the chopper to crash it and kills the pilot. Also is there a way to set up a trigger that checks the distance between the chopper and the ground? So I can force eject the players and AI out before it hits with enough timee to deploy their chute.

Added 15 minutes later:

This is the trigger that will damage the chopper further, truely making it crash "CH setHit ["mala vrtule", 1];CH setdamage .7; Pilot001 setdamage 1;" And then if I can get help on the distance to ground thing this force ejects the people out of the chopper "Player001 action["eject", CH] ; CmdOfficer action["eject", CH]"

This post was edited by Mountaindewbot (2012-10-22 00:10, ago)

I play DayZ quite a bit, If you happen to find me there I AM FRIENDLY!! which means No Stabby! mmmk

Author Message


Posts: 92
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2012-10-22 00:17        
     
It can all be done with triggers (using the getDammage command and the getPosATL command).

First trigger would have as condition:
getDammage CH < 0.9
On Act.
CH setDamage 0.9; driver CH setDamage 1; HeloHit = true;

Second trigger's condition:
HeloHit && (getPosATL CH select 2) < 60
On Act.
{_x action ["getOut", CH];sleep 0.3;} foreach crew CH;

The first trigger could also be replaced by an eventHandler.


Advertisement


Author Message


Posts: 34
Rank:


Level: Member

Country: us
Location: Wisconsin
Occupation: Graphic Artist
Age: 33
In-game name: ={ZRT}= Peter

 
#3 Posted at 2012-10-22 00:34        
     
What is the purpose of the select 2 thing? wouldn't you just need the getPosATL?

Added 7 minutes later:

And what does the sleep 0.3 thing do? is that in seconds how long they have to deploy parachutes?

This post was edited by Mountaindewbot (2012-10-22 00:42, ago)

I play DayZ quite a bit, If you happen to find me there I AM FRIENDLY!! which means No Stabby! mmmk

Author Message


Posts: 92
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2012-10-22 11:11        
     
select 2 selects the z coordinate, which is the altitude above terrain.
The sleep 0.3 is a small delay between each ejection, so that they dont eject all exactly in the same place. It's totally optional though, but imho it looks a bit better.