Help with platformer and animations.

This forum is currently in read-only mode.
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • Hey guys, Construct newbie here. I've got a platformer character, and I can get him to shoot when I press spacebar. It goes to the animation, but it doesn't play, it just stays on the first frame. And when I press down spacebar the bullets are supposed to spawn but they don't. Any help?

    Thanks in advance.

    (I can't figure out how to attach stuff, so I just uploaded it somewhere else)

    http://www.mediafire.com/?kxneljuzzww

  • There's a few problems here which I'll go through:

    You don't need the set animation speed, you can set animation speed via properties by clicking an animation angle.

    Your stopped animation is tagged, so the behavior will reset the animation whenever the character isn't moving.

    You don't need separate animations for directions; just have 1 'Walking' animation and have 2 different angles for it.

    The main problem is that all the animations are sub-animations. This is stopping them playing properly, so you should just create them normally. Right click a blank area of the tree and 'add new animation'. You can copy the old frames in.

    I managed to get it working after those .

  • Thanks Rich! Quick reply.

    [EDIT]

    http://www.mediafire.com/?iml1ddyzryt

    Okay, I tried to follow all your points.

    So now it's not working much, I tried to do what you said with the angles for the walking but I don't think I'm doing it right...

    And now the "shoot" animation doesn't play at all, and I can't get it to spawn my bullets.

    So yes, I think I need help...

  • The shooting animation is being continuously set to play with your events. You should replace the 'control is down' with 'control is pressed', then it'll only play when you press shoot, which I imagine is how you intend it.

    The walking animations playing weirdly appears to be a bug with tagged animations, you should report that. For now, turn the walking tag off and set the animations for walking manually. You should have events to set the angle to 0 or 180 depending on what button's pressed, for the directions.

    The bullet isn't spawning because you have 'invisible on start' ticked with it.

  • Hmm ok so I've made a fair bit of progress. But now, when you shoot and reload about 2-4 times, it crashes, and I have no idea why, the error message just says something about debugging which doesn't really help me much. Anyway, hopefully someone has encountered this sort of thing before.

    But anyway, Construct is awesome, and this is the furthest I've gotten into a gaming project and it's been only two days, so yeah, it's pretty damn cool.

    .cap:

    http://www.mediafire.com/?tttghem0mwq

  • Okay, fixed it, it had something to do with having python scripting enabled. Thanks for your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should report every crash you get, they're always bugs.

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