1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Adding variations of the same sprite animation

Discussion in 'Modding Help' started by Im_a_Turtle, May 8, 2013.

  1. Im_a_Turtle

    Im_a_Turtle Arsonist

    Messages:
    403
    Is it possible (code wise) to add a variation to a sprite animation, such as the death sprite? I'm hoping to add more sprite variants to the death animations.
     
  2. wolfwang

    wolfwang Builder Stabber

    Messages:
    24
    in the knight.cfg is something
    and in KnightAnim.as
    Code:
    if (blob.hasTag("dead"))
    {
    this.SetAnimation("dead");
    Vec2f oldvel = blob.getOldVelocity();
     
    //TODO: trigger frame one the first time we server_Die()()
    if (vel.y < -1.0f) {
    this.SetFrameIndex( 1 );
    }
    else if (vel.y > 1.0f) {
    this.SetFrameIndex( 3 );
    }
    else {
    this.SetFrameIndex( 2 );
    }