Home   Help Search Login Register  

Author Topic: tigger expCond field for pilot only  (Read 2060 times)

0 Members and 1 Guest are viewing this topic.

Offline Cougarxr7

  • Members
  • *
tigger expCond field for pilot only
« 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!
If this thread is in volation of forum rules , please delete.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: tigger expCond field for pilot only
« Reply #1 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?
« Last Edit: 13 Jun 2009, 23:00:32 by Worldeater »
try { return true; } finally { return false; }

Offline Cougarxr7

  • Members
  • *
Re: tigger expCond field for pilot only
« Reply #2 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!
If this thread is in volation of forum rules , please delete.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: tigger expCond field for pilot only
« Reply #3 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.
try { return true; } finally { return false; }

Offline Cougarxr7

  • Members
  • *
Re: tigger expCond field for pilot only
« Reply #4 on: 14 Jun 2009, 03:36:02 »
Worldeater, thank you so very much! It works!
If this thread is in volation of forum rules , please delete.