Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
mattxr

Trigger Condition: Height of Aircraft

Recommended Posts

Is there any way i get a trigger to start when an Aircraft of a specific side goes above a certain height. Say 12m

Share this post


Link to post
Share on other sites

Set up a global array, to which you add all the aircrafts that you want to observe.

Trigger condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({ (getPos _x) select 2 > 12} count AircraftsToWatch ) > 0

'AircraftsToWatch' is that array.

From time to time clean up the array from destroyed aircrafts, in order to keep the list short.

Share this post


Link to post
Share on other sites

How do you mean with

Quote[/b] ]From time to time clean up the array from destroyed aircrafts, in order to keep the list short.

Sounds dangerous to use lol.

Share this post


Link to post
Share on other sites

That's just a sidenote on performance, the shorter the list the less cpu time is required to check all entries. And the trigger runs this count check every cycle. As destroyed aircrafts (or null-object after it has been deleted) can't fly higher than 12m, is not necessary to check them.

Shouldn't matter in most cases, only if your mission will run for hours and destroyed choppers respawn (and added to the array o.c.), and trigger is set on 'repeatedly'

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  

×