How do I change animation's frame speed with code

0 favourites
  • 9 posts
From the Asset Store
three fully animated characters ideal for your RPG side scroller projects
  • So I want to change speed of specific frame with the code... so I won't have to create 100 animations with same sprites, but will have just one, which will be controled with the code...

    Anyone?

  • Would making another animation that's just the frame you want to change the speed of work? You could then switch to that and change the speed of that particular animation and then switch back to original.

    Scratch that, you can probably just use compare frame condition to check for when you want to slow or speed up the animation.

  • The problem is I don't want to change speed of all animation. Just specific frame. Other frame must be independent.

    Oh... I didn't understant at first time. Well, maybe having every sprite as different animation will work. I can set playing one after another stops, then control the speed of them separetly. Yes, I think it'll work

  • If I understand what you are asking, you can change the speed of a specific frame in the image editor using the animation frame properties.

    Just double-click the sprite, click on the frame of the animation you want to change and in the properties there will be a Frame Speed you can edit.

    As far as I know, you cannot edit the frame speed using events though.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What I meant with compare frame was that you could skip doing multiple animations by checking for the frame at which you want to change speed and changing it back to normal at a later frame.

    And wow, there is indeed frame speed for each frame.

  • Yes, yes. I wanted to change frame speed with events, I know I can change I from animation properties

    I will just have every frame as separate animation. That will do 😊

  • AnimationFrameSpeed is a sorely needed sprite expression. Without it there is no way to time animations which have frames with a speed of more than 1. Replicating frames for a large number of animations is not an acceptable workaround.

    Would appreciate a response from the Scirra team on this.

  • I know Aesprite can export .json file for animations. I wonder if there would be a way to load animation info ingame.

  • AnimationFrameSpeed is a sorely needed sprite expression. Without it there is no way to time animations which have frames with a speed of more than 1. Replicating frames for a large number of animations is not an acceptable workaround.

    Would appreciate a response from the Scirra team on this.

    There's a lot of stuff missing from the expressions/actions. I'd rather not create a behavior just to get/set the frame speed, but it looks like I'm going to have to. :\</p>

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)