Jump to content
Sign in to follow this  
roguetrooper

Performing an animation on all clients?

Recommended Posts

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
[[[_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
[[[_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
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

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
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

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

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×