Jump to content
Sign in to follow this  
ArmAriffic

Activate a trigger when height >15

Recommended Posts

In the condition field I have

Player in thislist

what do I add so that the trigger will activate when the player is flying under 15?

Share this post


Link to post
Share on other sites

Activated by: west

Condition: {_x is oftype == airvehicle and getposatl lessthan 15

That is not exact code I am using my cell phone and trying to type code by using a cellphone is rather difficult but it should get you pointed in the right direction

Share this post


Link to post
Share on other sites

This should do it:

(vehicle player) isKindOf "Air" && (getPosATL (vehicle player) select 2) < 15

Share this post


Link to post
Share on other sites

Try this mate.... one way of doing it (spawning a script).

Leave the condition field as this.

In the onAct:-

nul = [thislist] spawn {_list = _this select 0; if ((vehicle player) in _list and vehicle player isKindOf "Air" and ((getpos player) select 2) < 15) then {hint "player is under 15m"}};

..or the second way (executing an actual script):-

Leave the condition field as this.

In the onAct:-

nul = [thislist] execVM "test.sqf";

test.sqf:-

_list = _this select 0;
if (vehicle player in _list and (vehicle player) isKindOf "LandVehicle" and ((getpos player) select 2) < 15) then {

       //code here executed when player is in Air vehicle and under 15m height.
hint "player is in an AIR vehicle and is under 15m";

};

EDIT:...I was too slow.

Share this post


Link to post
Share on other sites
This should do it:

(vehicle player) isKindOf "Air" && (getPosATL (vehicle player) select 2) < 15

That got it, thanks

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  

×