OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: filth on 17 Apr 2008, 22:33:25

Title: player using an action 'groupchats' a message.
Post by: filth on 17 Apr 2008, 22:33:25
the situation is: i have an object which has been placed on a multiplayer map and i have added an action to that object. what i need is a script / line of code that tells the rest of the side that an individual has used that action.

specifically: the object is an ammo box. and the action is to move it. the chat line would be: "Player1 has moved the ammo crate."
thx in advance.
Title: Re: player using an action 'groupchats' a message.
Post by: Mandoble on 18 Apr 2008, 16:42:39
without scripting:
Add a trigger which condition is my_message > 0, check it continuously. in the action field put your chat message and also my_message = 0.

Somewhere inside your action code put:
Code: [Select]
my_message = 1;publicVariable "my_message"
Title: Re: player using an action 'groupchats' a message.
Post by: filth on 20 Apr 2008, 18:30:34
thanks.  :cool2: