Jump to content
Sign in to follow this  
canadian1337

ambientAnim problem on a dedicated server

Recommended Posts

Long story short - BIS_fnc_ambientAnim works fine in a SP preview. The animation is played properly etc.
When I tried playing the mission on a dedicated server the same AI started to change their positions (teleport) by about 4-5 meters from their original place or sometimes just change the direction they had earlier faced.

 

An example of what happens:

Spoiler

20C0000B17F168A96A19F0D61EC2CEF783F1D811

Each medic should face the wounded.

 


The way I'm calling the ambientAnim:

this disableAI "ALL";

if (isServer) then { [[medic_anim,"KNEEL_TREAT", "FULL"],BIS_fnc_ambientAnim ] remoteExec ["call"] };

 

Share this post


Link to post
Share on other sites

A lil bit of an update.

 

Tried to make a use of get/setPos and get/setDir. Only worked on 1 of the AI, the rest teleported :/.

Share this post


Link to post
Share on other sites
6 hours ago, R3vo said:

I would not recommend to use ambient animations on a dedicated server. The function was never written for multiplayer.

That has been my experience too, with the function.

 

According to @pierre MGI on the BI WIKI comments.. https://community.bistudio.com/wiki/BIS_fnc_ambientAnim

if (local this) then {[this,"SIT2"] call BIS_fnc_ambientAnim} // OK, best way

I don't know if it works on a dedicated server, but pierre MGI says it works on a self hosted server, presumably for remote clients as well.

Share this post


Link to post
Share on other sites
58 minutes ago, SuicideKing said:

That has been my experience too, with the function.

 

According to @pierre MGI on the BI WIKI comments.. https://community.bistudio.com/wiki/BIS_fnc_ambientAnim


if (local this) then {[this,"SIT2"] call BIS_fnc_ambientAnim} // OK, best way

I don't know if it works on a dedicated server, but pierre MGI says it works on a self hosted server, presumably for remote clients as well.


For some reason it didn't work for me in SP so I took the other option also listed by pierre.

Share this post


Link to post
Share on other sites
2 hours ago, canadian1337 said:


For some reason it didn't work for me in SP so I took the other option also listed by pierre.

His original code on the wiki has a syntax error, if that's what you mean - should be

local this

instead of

local [this]

 

if it didn't work despite that, then idk...

Share this post


Link to post
Share on other sites
1 hour ago, SuicideKing said:

His original code on the wiki has a syntax error, if that's what you mean - should be

local this

instead of

local [this]

 

if it didn't work despite that, then idk...

I fixed the syntax.

  • Like 2

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  

×