OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Surdus Priest on 23 Oct 2007, 23:01:49
-
in sqs, the condition for when the player is in a vehicle is: !(vehicle player != player); and (vehicle player = player) for when the player isnt.
but in sqf whats the condition to determine whether or not the player is in a vehicle?
surdus
-
same thing
if (vehicle player == player) then {};
if (vehicle player != player) then {};
LCD OUT
-
You beat me to that one, but I'll just clarify by pointing out that:
!(vehicle player != player)
is exactly the same as:
(vehicle player == player)
Logic thankfully hasn't changed at all between SQS and SQF, just the programming structures that use them (so you would use "? condition : stuff" in the archaic SQS, where you'd use "if (condition) then { stuff };" in shiny new SQF).
-
im beginning to wonder just how closely related sqf is to VB or javascript :P