OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Cougarxr7 on 13 Jun 2009, 20:15:01

Title: tigger expCond field for pilot only
Post 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!
Title: Re: tigger expCond field for pilot only
Post by: Worldeater on 13 Jun 2009, 22:49:02
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?
Title: Re: tigger expCond field for pilot only
Post by: Cougarxr7 on 14 Jun 2009, 00:28:25
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!
Title: Re: tigger expCond field for pilot only
Post by: Worldeater on 14 Jun 2009, 01:33:31
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:

Code: [Select]
(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.
Title: Re: tigger expCond field for pilot only
Post by: Cougarxr7 on 14 Jun 2009, 03:36:02
Worldeater, thank you so very much! It works!