OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo on 09 Feb 2005, 08:45:50

Title: Check if _guy has is not player then make him go to #skip?
Post by: pexmo on 09 Feb 2005, 08:45:50
I want to add a line to a script that checks if _guy is NOT a player. If _guy is not a player i want him to go directly to the #skip at the end of the script. How do i do this?
Title: Re:Check if _guy has is not player then make him go to #skip?
Post by: h- on 09 Feb 2005, 09:04:46
? _guy != player: goto "skip"
Title: Re:Check if _guy has is not player then make him go to #skip?
Post by: pexmo on 09 Feb 2005, 09:06:32
I also would like to have a line put in that checks if a player fires then setcaptive false.
Title: Re:Check if _guy has is not player then make him go to #skip?
Post by: h- on 09 Feb 2005, 09:54:38
Umh..
For that you need to use 'fired' eventHandler...

Put the following in the player's init field:
Code: [Select]
this addEventHandler ["fired",{this setCaptive false}]
No guarantees on the syntax.. :P