0 Favourites

bird flight?

  • So first off I'd like to apologize in advance if there is already a thread on this. I've been searching the forums for a few hours and using the sticky to try to resolve the problem on my own, but it seems I am hitting a wall..

    I am trying to build a very basic game, and I have all of the elements for my game done, but I can't seem to load two animations into my sprite.

    I am trying to make "running" style game where a owl flies through a library, needing to dodge the bookshelves and flaming books that are raining down.

    So for this, I have established I can do it in two ways, the way I have been able to figure out but not sure is actually what I need is by using 8 direction. I changed the 8 direction settings to 4 ways, removed the angle and set it so that the animation will correctly view back and forth regardless of the direction. I feel like this is important for my game in particular because I have the raining hazards and the book shelves/platforms to maneuver around.

    So when I press up to make my bird fly up or down, I have an animation that I would like to use, but regardless of how I program the event, it won't seem to actually change the animation.

    scirra.com/tutorials/413/direction-based-sprite-animation --- was using this to follow the basic sprite setup

    These are the four frames I have for the sprites. Up, Down, and idle/flapping two frames.

    i.imgur.com/SNGxmtR.png

    i.imgur.com/2CBJwA9.png

    i.imgur.com/R98TDnR.png

    i.imgur.com/eVeTqkT.png

    Can anyone specify what I am missing with the animation graphic, to make it so when I glide up or down it changes just for that time that you have the key pressed?

    I have the animations loaded as separate objects and as separate animations on the same sprite because I was trying so many different things..

    scirra.com/forum/flying-bird_topic60749.html -- I did try to follow this forum post as well...

    The controls used for this game and as provided by the example are great and would work well for my game too, I believe, but when I try to program the custom controls my bird will only turn left and right because of my events that cause the animation to flip, otherwise it stays still...

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • What are your conditions/actions for setting your animations?

  • Aphrodite Endless fiddling of the settings actually helped me to change the animation, this is what I have so far:

    Events:

    Keyboard> Left Arrow Pressed - Mirrored

    Keyboard> Right Arrow Pressed - Not Mirrored

    Keyboard> Up Arrow is down - Set animation to "Up" (play from beginning)

    Keyboard> Down Arrow is down - Set animation to "Down" (play from beginning)

    So now by default my sprite is flapping it's wings, when I press up it changes to the up frame, down changes to down frame, but when it is not pressing up or down, it stays stuck in the same frame.

    Now I need to reset the sprite to go back to it's idle (flapping) animation... I believe I need to use "else" to do this, but I couldn't find out how to really do that?

  • Krawwly : can't you set the animation to go back to it's flapping animation when you release Up and down? (I could misunderstand it)

  • Aphrodite Well that's what I am trying to do but I can't seem to set the right event to do that. :(

  • Keyboard: On key released (up) : set animation to "idle"

    Keyboard: On key released (down) : set animation to "idle"

    I think this can do it.

    Also:

    Keyboard> Up/Down Arrow is down - Set animation to "Down" (play from beginning)

    I'm not sure playing from beginning is a good thing in that case

  • Alright, I'll give that a try and get back to you! Thanks so much for your quick response.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Endless flight game
55 5,235
Doc Ai's avatar
Doc Ai
Unread hot topic
0 Favourites
Dash up bird [DEVLOG]
43 4,319
droxon's avatar
droxon
Unread hot topic
35 2,058
Madrasmadnes's avatar
Madrasmadnes