Jump to content

Recommended Posts

Hi there,

 

I'm experiencing issues with the BIS_fnc_ambientAnim function when hosting a mission on a dedicated server. When the mission first launches, any players that are in the server lobby and load in when the mission starts, the animations are not playing. However, if they leave and rejoin, all the animations are working perfectly fine.

 

I'm calling a custom script I wrote from the initServer.sqf like so as an example: 

 

[args] execVM "scripts\ambAnim.sqf";

 

Within the script I'm setting some unit values such as behaviour and combat mode, then calling the following for the animation:

 

if (local _object) then {

    [_object, _animation, _equipment, _snapToObj] call BIS_fnc_ambientAnim;

};

 

I've tried using remoteExecCall like so within the custom script file: 

 

if (local _object) then {

    [_object, _animation, _equipment, _snapToObj] remoteExecCall ["BIS_fnc_ambientAnim"];

};

 

However, this produces weird results, such as the units facing wrong directions, or being halfway in the ground, and I'm assuming this would cause the server to have all clients, when another client joins, to re-run the BIS_fnc_ambientAnim function?

 

I've also tried various combinations of calling the BIS_fnc_ambientAnim function, as well as calling the custom script directly, such as:

  • units init w/o if (local) check
  • units init w if (local) check
  • Eden Editor init
  • initPlayerLocal.sqf
  • init.sqf
  • Using call
  • Using spawn

 

I did also run the mission from on a player hosted server, but then only the host was able to see the animations when the mission started. It's as if the server isn't correctly notifying players that x object should be playing an animation when the mission starts?

 

I'm fairly new to scripting in Arma3, hopefully it's something fairly obvious that I'm doing wrong here, but any help would be much appreciated!

Share this post


Link to post
Share on other sites

if (local _object) then {

    [_object, _animation, _equipment, _snapToObj] call BIS_fnc_ambientAnim;

}

is the right way. This function uses AL EG commands. Perhaps you should delay a little bit the anim at start.

 

 

You have also another newer function anim created for Expeditionary forces DLC (if all payers have this DLC). Not tested
 

Spoiler

 

/*
    ambientAnim
    basically modernized BIS_fnc_ambientAnim
    description todo

    current animations as of Dec-25-2022:
        StandUnarmed
        StandArmed
        SitArmed
        SitUnarmed
        SitFlatUnarmed
        SitDepressedUnarmed
        Wounded
        Agony
        Treating
        TreatingUnarmed
        KIA
        KIAWall
        HandsBack
        Watch
        KneelArmed
        KneelUnarmed
        RepairStand
        RepairKneel
        RepairProne
        SitHighArmed
        SitTable
        SitDepressedMid
        Exercise
        Lean
        Briefing
        BriefingLeft
        BriefingRight
        BriefingTable
        StandUnarmedGuard

    Example(s):
        [this, "KIA"] call EF_fnc_ambientAnim;
*/

 

 

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

×