How to use AnimateEntityPacket

Discussion in 'Development' started by None, Nov 26, 2021.

  1. None

    None Creeper

    Messages:
    5
    Hello guys, I found this function in AnimateEntityPacket but I don't actually know how to use these parameters, Is there any example for how to use this? (i want to create an animation when player do some actions and stop when that action finished)

    PHP:
    public static function create(string $animationstring $nextStatestring $stopExpressionint $stopExpressionVersionstring $controllerfloat $blendOutTime, array $actorRuntimeIds) : self{
            
    $result = new self;
            
    $result->animation $animation;
            
    $result->nextState $nextState;
            
    $result->stopExpression $stopExpression;
            
    $result->stopExpressionVersion $stopExpressionVersion;
            
    $result->controller $controller;
            
    $result->blendOutTime $blendOutTime;
            
    $result->actorRuntimeIds $actorRuntimeIds;
            return 
    $result;
        }
     
    Last edited: Nov 27, 2021
  2. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    idk but you should cover the code in a Codeblock / Code Quote? (idk the name)
    something like this
    PHP:
    print("Hello world");
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.