OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Carroll on 24 Sep 2008, 12:23:40

Title: Detect Flying Height
Post by: Carroll on 24 Sep 2008, 12:23:40
Hi, i've got a repeating trigger i want to activate when ever the chopper i am flying gets above say 100 metres.

Wot code should i be putting into the trigger condition?

Code: [Select]
? (getPos this select 2 < 40) and (getPos this select 2 > 25):trigger1=truei found this bit of code doing a search but i'm getting an invalid expression error

i had been thinking about someyhing like
Code: [Select]
?(Player flyInHeight >100)But i knew this wouldn't work before i even tested it  ???
Title: Re: Detect Flying Height
Post by: Wolfrug on 24 Sep 2008, 12:45:09
Name your chopper something, say, chop1. Now make a trigger with this condition:

Condition: (getPos chop1 select 2) > 100
On Activation: hint "Your chopper is over 100 meters in the air!!";

And that's that. :)

Wolfrug out.
Title: Re: Detect Flying Height
Post by: Carroll on 24 Sep 2008, 14:27:41
Cheers Wulfrug, i'll give it a try tomorra when i get home  :good: