Thread: fetching current animation

Results 1 to 3 of 3
  1. #1
    Donated 15NS$ for Sven's Holiday at the Bahamas Puchi's Avatar  
    Artist
    Join Date
    Nov 2002
    Location
    Akihabara, Bochum or Sailune
    Posts
    5,617

    Question fetching current animation

    With great help from H2Whoa, Geckon, Zode, Nero and KernCore, I already could redo nearly the entire xen_plantlight entity.
    However, I ran into one issue (currently):
    I cannot fetch the currently used animation, and most likely can not not change it aswell. KernCore suggested it's not possible because m_Activity is only exposed in CBaseMonster.
    The AS Error message is obvious:
    'm_Activity' is not declared

    Original script available here, until line 180

    My code: plantlight.as
    Do it with passion, or not at all.
    Do not say everything you know. Know everything you say.
    [ MarySP ][ nacl-h2o ][ The next SC Version ♥♥♥♥ing pwns! ][Puchis Maps ]

  2. #2
    func_vehicle enthusiaist w00tguy123's Avatar
    Join Date
    Dec 2006
    Location
    U.S. West
    Posts
    1,594

    Re: fetching current animation

    The current animation should be stored in pev.sequence.

    You can set animations on players this way (maybe it works for CBaseAnimating too?):
    Code:
    CBasePlayer@ plr = wootgu;
    
    // Manually set wrench windup loop animation
    plr.m_Activity = ACT_RELOAD;
    plr.pev.frame = 0;
    plr.pev.sequence = 26;
    plr.ResetSequenceInfo();
    The m_Activity part doesn't seem to be required judging from the quick test I did, so comment that part out and see what happens.
    Love,
    w00tguy

  3. #3
    Donated 15NS$ for Sven's Holiday at the Bahamas Puchi's Avatar  
    Artist
    Join Date
    Nov 2002
    Location
    Akihabara, Bochum or Sailune
    Posts
    5,617

    Re: fetching current animation

    Thank you very much, that was it.
    KernCore found out we have to use
    Code:
    pev.frame = 0;
    pev.sequence = 3; 
    self.ResetSequenceInfo();
    Do it with passion, or not at all.
    Do not say everything you know. Know everything you say.
    [ MarySP ][ nacl-h2o ][ The next SC Version ♥♥♥♥ing pwns! ][Puchis Maps ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •