OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Cougarxr7 on 13 Jun 2009, 20:15:01
-
This works for all vehicles, is there a syntax to change it to work for pilots only?
expCond="vehicle player != player and local player";
expActiv="myvec = vehicle player; evh_1 = execVM, "scripts\allowed.sqf",
Thanks!
-
The following should work (beware: I haven't tested it):
vehicle player != player and vehicle player isKindOf "Air" and local player
Edit: Scratch that. It's wrong...
BTW: what do you mean by "pilot"? The models with the funny helmets or some unit that's currently sitting on a pilots seat?
-
Thanks for replying!
As far as "Pilot" , yes it with the funny helmets.
The pilots fly/drive the aircraft. They are the ones I want to get the script file to run/work for.
I've tried that "iskindofair" everywhere and could not get it to work, so I posted in the forums.
Thanks for your help!
-
Let's see...
Check if the player is inside a vehicle: vehicle player != player
Check if the player is driver/pilot: driver vehicle player == player
Check if the vehicle is an "air unit": vehicle player isKindOf "Air"
If all this is true then the player is currently a pilot. Combined:
(local player) && (vehicle player != player) && (driver vehicle player == player) && (vehicle player isKindOf "Air")
Note: The brackets are not needed but they make it more readable.
-
Worldeater, thank you so very much! It works!