Forum Jump :

Author Message

Posts: 1513

Level: Member

Country: uk
In-game name:

#197920 Posted at 2017-09-19 01:42        
Wont the above fire for none aircraft as well?

if you need it to work on just a certain type of vehicle they you need to filter it.

{_x iskindof "AIR" && isTouchingGround _x}  count thislist  > 0

that may not work on the carrier as I don't know if it's classed as ground so this may work

{_x iskindof "AIR" && (getpos (_x) select 2) <1  } count thislist > 0

Another way would be to use an eventhandler placed in the vehicle init
when the engine is turned off it checks if it's inside the named trigger and executes the script

this addeventhandler ["engine",{if ([rep_trigger, (_this select 0) ] call BIS_fnc_inTrigger && isTouchingGround (_this select 0)) then {_xhandle= (_this select 0) execVM "x_reload.sqf"} }]

This post was edited by F2kSel (2017-09-19 02:14, 302 days ago)