OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Joiner on 24 Apr 2009, 17:03:05

Title: The playMove command in MP
Post by: Joiner on 24 Apr 2009, 17:03:05
Hello all!
I'm making an MP mission, in which certain players will play certain movements when certain conditions are met. Is it enough to make a trigger in the editor and to specify the following in it (it's just an example, there is no sense in those actions):
Code: [Select]
Condition: getDammage soldier1 > 0 or getDammage soldier2 > 0 or getDammage soldier3 > 0;
Action: soldier1 playMove "AmovPpneMstpSrasWrflDnon";
Or do I have to create some additional code? It looks like the example above doesn't work for me (I'm soldier1). If additional code is needed, could you give an example please? Thanks in advance.
Title: Re: The playMove command in MP
Post by: laggy on 24 Apr 2009, 18:04:19
Condition: damage soldier1 > 0 or damage soldier2 > 0 or damage soldier3 > 0
OnActivation: soldier1 playMove "AmovPpneMstpSrasWrflDnon"


That should work in a trigger IF the playMove is a valid one.
Title: Re: The playMove command in MP
Post by: Joiner on 24 Apr 2009, 21:26:33
The playMove command works fine if the condition is without OR:
Code: [Select]
getDammage soldier1 > 0;If the condition is with OR, e.g.:
Code: [Select]
getDammage  soldier1 > 0 or getDammage  soldier2 > 0;or
Code: [Select]
getDammage  soldier1 > 0 || getDammage  soldier2 > 0;The playMove command doesn't work.  :confused:
Any idea why this happens?
Title: Re: The playMove command in MP
Post by: Ironman on 24 Apr 2009, 21:59:35
I don't know how much this will help but maybe try putting it like this:

Condition:
Code: [Select]
(getDammage  soldier1 > 0) || (getDammage  soldier2 > 0);

maybe that is too stupid of an answer to be right.... lol

I know a few times I have forgotten the parenthesis....
Title: Re: The playMove command in MP
Post by: Joiner on 25 Apr 2009, 14:57:59
No, parenthesis do not help  :(
BTW, if I use the following trigger:

Condition: getDammage  player > 0;
OnActivation: [player] execVM "blabla.sqf";

and in the blabla.sqf file specify the following:

?(local server):exit;
if (playerside == east) then {
   soldier1 playMove "AmovPpneMstpSrasWrflDnon";
};

Will the player who is controlling soldier1 play that movement only when HE gets some damage or will he play it if ANY player in the game get some damage? I mean will he be considered as a player only on his local computer or will all the others be cosidered by the game as players?
Title: Re: The playMove command in MP
Post by: Deadfast on 26 Apr 2009, 09:49:48
Try to replace On Activation with a hint to see if the trigger even gets executed.
Title: Re: The playMove command in MP
Post by: Ironman on 27 Apr 2009, 17:24:57
You can always crack open Evo and see how they do the dancing party at the end...