OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: tybeas on 19 Oct 2002, 19:43:36
-
Okay, I want to add an action to a guy in a map, in order to allow him to create vehicles. So I use the command line :
myguy addaction ["Create a jeep","createajeep.sqs"] for example.
The problem is that I only want HIM, and only HIM, to be able to create a jeep. The thing is that anyone who stands near that guy is now able to create a jeep (which I don't want ;) ).
So, how to avoid others to create stuff when next to that guy ?
And while I'm at it. Anyway to add an action but specificly to a particular position in a vehicles, for exemple the driver (so to do the aciton, the player would have to be in the driver seat) and not the whole vehicle itself ?
Thanks ;D
-
Hi there tybeas :)
For the first question, the following code will add the action to a specific player and will be only available for him:
?(Player == MyGuy): MyGuy addaction["action","action.sqs"]
For the second question, you could use a trigger like that:
x: 0
y: 0
activate: repeatedly
Condition: driver MyJeep == MyGuy && Player == MyGuy
Activation: MyAction = MyGuy addaction["action","action.sqs"]
Deactivation: MyGuy removeaction MyAction
Happy editing 8)