OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OrnelP on 30 May 2006, 21:07:19
-
:D Hurrah for the forums being back....now time to overload them again ;D
1st question. How do i detect if a loon is NOT in a vehicle, something like Loon in car1 is there a loon not in car1?
2nd question. In a script how do i detect if a loon is not alive?
Not alive loon goto #end? please see if you could help thanks...
-
1)
if ( vehicle player == player ) then { hint "Player is not in any vehicle!" }
will mean that the player is the vehicle of itself, so player is not in a car etc. other vehicle other than "player"
but but but, I understand now that you want to check a specific vehicle like yourJeep:
if ( vehicle player != yourJeep ) then { hint "Player is not in yourJeep!" }
If you want to use this in a trigger, then simply write there:
condition: vehicle player != yourJeep
on activation: hint "Player is not in yourJeep!"
2)
if ( ! alive player ) then { hint "Player is not alive!" }
-
ok, i beleive i understand but what makes this syntax, well, what makes the point? what is the main. i dont know how to word this but im just gonna type it.... What makes the player not in car trigger? how do i know that this means not in car, what would in car be?
Barg! >:( why do i have to be a computer programmer to play OFP... command and conquer here i come!!!!!
-
Jojo! another Tarzan English writer!!!! ;D
Well what I've just undertstand.. its that you want to check if the players is in a vehicle.. and if it is alive or dont... so these things may help you...
;If the player is alive and out the "vehicle", quits the script
;exec it as "[Jeep,man] exec "thisscript.sqs"
; where jeep is the veihlce in question, and man.. well.. the man
_vehicle = _this select 0
_man = _this select 1
#check
If not _man in _vehicle and alive _man : exit
<Code here>
goto "check"
exit
and in ComRef it says:
soldier in vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Boolean
Description:
Check if soldier is mounted in the vehicle.
Example:
player in jeepOne
(Note: boolean is true or False)
alive obj
Operand types:
obj: Object
Type of returned value:
Boolean
Description:
Check if given person, vehicle or building is not dead / destroyed.
Example:
alive player
-
Ah, I beleive i have been enlightened. Thank you for the explanation Flauta....mmm....flauta, with hot sauce and onions.... ;D
-
Scuse me?
What's the meaning of flauta for you? =P
Im glad to help you