Jump to content
wickedhaloruler

Animations are playing for anyone connecting to my server but not for me.

Recommended Posts

So i have an Arma 3 game server, I run my own custom mission file on it. I decided to add AI just doing random animations around the base to make it look more alive. In Singleplayer I can see all the animations working perfectly. I put the mission file on the server and for me, the AI are just standing and doing nothing, but for anyone else joining they are performing the animations. not sure what I'm doing wrong

Share this post


Link to post
Share on other sites

so I'm assuming you're using bis_fnc_ambientAnim

use remoteExec in combination with it.

remoteExec

BIS_fnc_ambientAnim

Pierre had provided a sample of such at the bottom of the documentation for the ambientAnim function. 

 

Share this post


Link to post
Share on other sites

Like Midnighters said use removeExec, since switchmove only has local effect effects_local.gif Any script with this 'EL' means that the effects of the script will only occur to where the command is called. So anything with that it's a good idea to have the server run it in remoteExec:

 

<params> remoteExec ["someScriptCommand", targets, JIP];

 

<params> = the parameter that the script needs

"someScriptCommand" = your command, must be in quotes

targets = 

Spoiler

 

From the BI wiki

targets (Optional): [default: 0 = everyone]

  • Number - Only 0 and 2 are special. When 0, the function or command will be executed globally, i.e. on the server and every connected client, including the one where remoteExec was originated. When 2, it will be executed only on the server. When 3, 4, 5...etc it will be executed on the client where clientOwner ID matches the given number. When number is negative, the effect is inverted. -2 means execute on every client but not the server. -12, for example, means execute on the server and every client, but not on the client where clientOwner ID is equal to 12.
  • Object - the function will be executed only where unit is local
  • String - the function will be executed only where object or group defined by the variable with passed name is local
  • Side - the function will be executed only on clients where the player is on the specified side
  • Group - the function will be executed only on clients where the player is in the specified group. In order to execute the function where group is local pass owner of the group as param: 
    _myGroup remoteExec ["deleteGroup", groupOwner _myGroup];
  • Array - array of any of types listed above


 

JIP = runs for every player that joins after the mission started, True, to not do that, false

 

"Animation_classname" remoteExec ["switchMove", 0, True];

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

×