Wyntech 0 Posted October 21, 2019 My problem is simple: once a player has activated a hold-action by holding space, an object in front of them is hidden, and another object appears. A sound must also play. If I (host) activate this, my players can see the effects. If one of my players activate the hold-action, only that individual can see the effect. For the others, nothing changes, including me. I used remoteExec to add the hold action, but not for the effects that occur when it is activated. What is the solution so that when a client activates the hold action, all on the server can see the effects as well? Share this post Link to post Share on other sites
stanhope 409 Posted October 21, 2019 Remote exec the code that's ran on the completion of the action as well. Share this post Link to post Share on other sites
pierremgi 4736 Posted October 21, 2019 Welcome on BI forum remoteExec the add Action (hold or not) is useful if you spawn an object and then making this action visible by all players. No need to remoteExec it if this command/function is in init field of an edited object. Any player will run the add Action (hold) if placed in this init field. Now, the second point, even if players can see/act your add Action (hold or not), the code will work locally. That means, you have to consider the arguments and effects localities for EACH command/function you run from this code. Example: doesn't need to be remote exec. needs to be remote exec on each PC you want to see this effect (sounds with playMusic, playSound are EL usually) is a little bit tricky. If the object is on the same PC as the player who triggers the action (same locality), you don't need to remote exec for Arguments, and Effects locality applies. Example: usually an hosted server hosts the objects like empty cars, crates, and the player as host can run AL code on it, not the other players. You can check that, with a car which will change its locality along with the driver. If you want to avoid this locality problem, you need to remoteExec on the PC which own the object. Example with playMoveNow for a code making on a remote unit, a prisoner animation. Even if the effect is global, you need to reach the unit on the PC which owns it : [ oneUnitHere, {oneUnitHere playMoveNow "AmovPercMstpSsurWnonDnon" } ] remoteExec ["call",oneUnitHere ]; 1 Share this post Link to post Share on other sites
Wyntech 0 Posted October 21, 2019 Thank you for the help, folks! This will help me tremendously. Share this post Link to post Share on other sites