roguetrooper 2 Posted November 22, 2013 In A2 usually an animation executed with switchmove was only locally. To have the animation be seen on all machines in MP, you could use: [objNull, _unit, rSWITCHMOVE, "AdvePercMstpSnonWnonDnon_godown"] call RE; How can you make a scripted animation in Arma III to show up on all machines when the command is executed locally? Share this post Link to post Share on other sites
samatra 85 Posted November 22, 2013 [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", nil, false, true] call BIS_fnc_MP; Share this post Link to post Share on other sites
Kn1ghtR1d3r 10 Posted November 22, 2013 [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", nil, false, true] call BIS_fnc_MP; I think it should be: [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", false, true] call BIS_fnc_MP; without "nil"... or without "false"... makes no difference. There is one parameter too much. Share this post Link to post Share on other sites
trnapster 12 Posted November 22, 2013 Can be deleted I was wrong :p Share this post Link to post Share on other sites
samatra 85 Posted November 22, 2013 I think it should be: [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", false, true] call BIS_fnc_MP; without "nil"... or without "false"... makes no difference. There is one parameter too much. No, everything was correct. "false" after "BIS_fnc_call" will make it execute it only on server, nil is value used to indicate that script should be executed everywhere. 5th argument is undocumented and defines if code should be called in scheduled environment or not (false for scheduled). Share this post Link to post Share on other sites
Kn1ghtR1d3r 10 Posted November 22, 2013 Oh my fault. It should be [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", true, false] call BIS_fnc_MP; As far as I know, "true" is the same as "nil". But anyway, I didn't know about the fifth parameter since it is not documented. What do you mean with "scheduled environment"? Share this post Link to post Share on other sites
samatra 85 Posted November 22, 2013 Oh my fault. It should be [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", true, false] call BIS_fnc_MP; As far as I know, "true" is the same as "nil". As far as I remember true excludes dedicated server (and non-dedicated server too?) But anyway, I didn't know about the fifth parameter since it is not documented. What do you mean with "scheduled environment"? http://community.bistudio.com/wiki/Code_Optimisation#Threads Share this post Link to post Share on other sites
Kn1ghtR1d3r 10 Posted November 22, 2013 I just tested it: [[0,"TEST1"],"life_fnc_broadcastMessage",nil,false] spawn BIS_fnc_MP; [[0,"TEST2"],"life_fnc_broadcastMessage",true,false] spawn BIS_fnc_MP; Both times the function was executed on the dedicated server... About the scheduled environment: That means when adding "true" as fifth parameter the function will be executed immediately ignoring any scheduling? And I guess "false" is default? Share this post Link to post Share on other sites
samatra 85 Posted November 22, 2013 About the scheduled environment: That means when adding "true" as fifth parameter the function will be executed immediately ignoring any scheduling? And I guess "false" is default? Yes, exactly. Share this post Link to post Share on other sites
roguetrooper 2 Posted November 24, 2013 Thanks for the effort, guys. [[[_unit], {(_this select 0) switchMove "AdvePercMstpSnonWnonDnon_godown";}], "BIS_fnc_call", nil, false, true] call BIS_fnc_MP; The switchmove-example might be not that useful, but is the method at all JIP compatible? Share this post Link to post Share on other sites
samatra 85 Posted November 24, 2013 What do you mean by JIP compatible? I think when player joins it gets current animation from the server so JIP shouldn't be a problem. Share this post Link to post Share on other sites
roguetrooper 2 Posted November 24, 2013 Whether the method [[[parameter], {(_this select 0) anyCommand}], "BIS_fnc_call", nil, false, true] call BIS_fnc_MP; is JIP compatible. Will the stuff be executed on clients who join after the whole script line had been executed? Share this post Link to post Share on other sites
samatra 85 Posted November 25, 2013 This whole script will be executed within one frame on all clients and will not be executed on clients that join afterwards. Also look at https://community.bistudio.com/wiki/BIS_fnc_MP Share this post Link to post Share on other sites