How make my character move 1 frame on the first frame of my animation?

0 favourites
  • 6 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • So I am making a game that is supposed to be a Megaman esc game. The question I have is how would I make a tippy toe function in a game on construct. How it works in Megaman is that on the first frame of the run animation Megaman only moves 1 pixel in order to have precise movement. After the first frame though it would just move into a normal run. Sorry if my explanation does not make a lot of sense. Hopefully someone will understand what I am saying though.

  • so you want to have a tile-like movement?

    what is the resolution of your game?

  • the resolution of my game is currently 640 by 360 but it is most likely gonna change at a later date. I first started with an attempt to do it by doing this

    Keyboard on → press player | Set animation to "tippyToe" (play from beginning)

    player | Move forward 1 pixels

    system | Wait 0.15 seconds

    player | Set animation to "blink" (play from beginning)

    This in some ways worked as it got the desired effect for the first frame but there was no way I could think of to add another action for walking that would not just "overpower" that action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Start with initRun instance variable at 1, if you want a 1 frame hold.

    + Keyboard: → is down
    ----+ Sprite: initRun > 0
    -----> Sprite: Set position to (Self.X+1, Self.Y)
    -----> Sprite: Subtract 1 from initRun
    
    ----+ System: Else
    -----> Sprite: Simulate 8Direction pressing Right
    
    
  • thank you very much

  • A timer is good too, for multiple frames. One frame is mostly imperceptible. You can use the timer is running condition to prevent simulated movement

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