Jump to content
Sign in to follow this  
zambiandude

Animations and BIS_fnc_MP

Recommended Posts

Ok so have been trying to wrap my head around this for the past week and am getting nowhere.

Basically i have an addaction that is activated when you are next to a target (in this case its a fellow player) which then calls a particular script when selected by the player. This script runs through a list of circumsances that determine whether or not to do a specific type of animation (so if the player is crouched it does ....; if they are prone .... etc etc ------- and then checks to see whether the other player is prone, crouched etc). Continues on to choose the animation and then executes the relevent animation on the player and the target player.

Now it all works fantastic in Single Player. Moving into a multiplayer enviroment is the issue. Everything works fine from a client point of view but of course the animations are not sent serverside so in comes the part i cannot get to work - BIS_fnc_MP.......

original working code:

 then {    

player switchMove _unitActionName;

 _target switchMove _targetActionName;
                   sleep _unitAdditionalDelay;
                   detach _target;

 }

Now I've looked all over the past week and tried so many different versions/methods that havent worked for me so Ill just so the latest version i was trying:

 then {    


[[player,"_unitActionName"],"switchMove",true,true,true] call BIS_fnc_MP;
[[_target,"_targetActionName"],"switchMove",true,true,true] call BIS_fnc_MP;

                   sleep _unitAdditionalDelay;
                   detach _target;

 }

Result gives nothing. I've tried Killzone Kids example in the BI BIS_fnc_MP examples and other methods :(

can anyone lend me a hand?

Cheers from downunder!

Share this post


Link to post
Share on other sites

I'm not sure if this is dangerous/if it works/if it's good practice to do this or not, but maybe you could just send a function over the net instead:

then {
[ [ [_unitActionName], {player switchmove (_this select 0);} ],"BIS_fnc_spawn",true,true,true] call BIS_fnc_MP;
[ [ [_targetActionName,_target], {(_this select 1) switchmove (_this select 0);} ],"BIS_fnc_spawn",true,true,true] call BIS_fnc_MP;
};
sleep _unitAdditionalDelay;
detach _target;

You'll probably have problems with this if you change the operation modes for BIS_fnc_spawn once the new Remote Exec Enhancements come around.

It might also be possible that something's wrong up the line.

Edited by Pwner

Share this post


Link to post
Share on other sites
Ok so have been trying to wrap my head around this for the past week and am getting nowhere.

Basically i have an addaction that is activated when you are next to a target (in this case its a fellow player) which then calls a particular script when selected by the player. This script runs through a list of circumsances that determine whether or not to do a specific type of animation (so if the player is crouched it does ....; if they are prone .... etc etc ------- and then checks to see whether the other player is prone, crouched etc). Continues on to choose the animation and then executes the relevent animation on the player and the target player.

Now it all works fantastic in Single Player. Moving into a multiplayer enviroment is the issue. Everything works fine from a client point of view but of course the animations are not sent serverside so in comes the part i cannot get to work - BIS_fnc_MP.......

original working code:

 then {    

player switchMove _unitActionName;

 _target switchMove _targetActionName;
                   sleep _unitAdditionalDelay;
                   detach _target;

 }

Now I've looked all over the past week and tried so many different versions/methods that havent worked for me so Ill just so the latest version i was trying:

 then {    


[[player,"_unitActionName"],"switchMove",true,true,true] call BIS_fnc_MP;
[[_target,"_targetActionName"],"switchMove",true,true,true] call BIS_fnc_MP;

                   sleep _unitAdditionalDelay;
                   detach _target;

 }

Result gives nothing. I've tried Killzone Kids example in the BI BIS_fnc_MP examples and other methods :(

can anyone lend me a hand?

Cheers from downunder!

First off be careful of the arguments you set in the BIS_fnc_MP. The last three boolean arguments are all set to true in your example which is in my opinion a bad thing based on what you're doing.

I'm not too sure how the BIS_fnc_MP works with sleeps if they're not executed inside its scope, but here's what I'd do instead:

then {
[ [player, _unitActionName], "switchMove", true, false, false ] call BIS_fnc_MP;
[ [_target, _targetActionName], "switchMove", true, false, false ] call BIS_fnc_MP;

sleep _unitAdditionalDelay;
detach _target;
}

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  

×