Jump to content
Sign in to follow this  
lemondragon

Global 'enableSimulation'

Recommended Posts

Hey there everyone.

I have this problem:

I am using

_target enableSimulation false

to freeze players (in multiplayer), the user freezing the other players sees the other person frozen, but the frozen person can just walk around.

I figured out the problem: "This command only works locally and must be run on all machines to have global affect.". The problem is, I can't find out how to use it correctly, so it's running globally.

Any help is appreciated ;)

Edited by lemondragon
spelling

Share this post


Link to post
Share on other sites
Hey there everyone.

I have this problem:

I am using

_target enableSimulation false

to freeze players (in multiplayer), the user freezing the other players sees the other person frozen, but the frozen person can just walk around.

I figured out the problem: "This command only works locally and must be run on all machines to have global affect.". The problem is, I can't find out how to use it correctly, so it's running globally.

Any help is appreciated ;)

Im no pro but i believe what enableSimulation false is doing is stopping the client from being synced across the server by well disabling there simulation if you want to freeze a player in MP try using the disableUserInput command instead

Share this post


Link to post
Share on other sites

Hi,

put this into your init.sqf

fn_enableSimulation = {

(_this select 0) enableSimulation (_this select 1);

};

Then you call it during the mission using BIS_fnc_MP.

enableSimualtion false:

[[_target, false], "fn_enableSimulation"] call BIS_fnc_MP;

And back to true:

[[_target, true], "fn_enableSimulation"] call BIS_fnc_MP;

Im no pro but i believe what enableSimulation false is doing is stopping the client from being synced across the server by well disabling there simulation if you want to freeze a player in MP try using the disableUserInput command instead

Nope it does exactly what he wants, it disables all physics, so to speak, for the given object. Not sending updates across the network is a side effect of that.

disableUserInput is never a good idea.

If the player was holding down W at the time you disable his keyboard he will keep running forever. Very unpleasant command to use. ALT+F4 is the only way out then.

Edited by sxp2high

Share this post


Link to post
Share on other sites
Im no pro but i believe what enableSimulation false is doing is stopping the client from being synced across the server by well disabling there simulation if you want to freeze a player in MP try using the disableUserInput command instead

I was about use that command, when I saw a post on the forums saying that it is discouraged to use that command.

@sxp2high

Thanks a lot , I will test this out tomorrow!

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  

×