Need help working out an algorithm... [SOLVED]

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Alright, I'm working on an addition to a feature in my Mario game, hitting ? Blocks. My problem? I didn't actually do the initial events myself, and don't really know how they work. Some very helpful person here helped me do it a while back, and it works fine. Here's what that guy did:

    <img src="">

    That makes the ? Blocks bounce upwards when you hit them from the bottom, and then return to their original position. Now what I'm trying to do is the exact opposite -- if you use a ground pound from the top, they bounce downwards, and then go back up to the same spot. I got that to work on its own, but when I try to implement both at once, I can't get it to work at all -- hitting it from the top OR bottom does nothing.

    So, uh... help please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been needing an a to b to a movement for a while, but until we get one there's always a state machine.

    In this case the state is either over or under the block.

    The cap should be a little easier to understand, if you get lerp.

  • Got it working, thanks. I don't really understand what lerp is doing, but I think I get the gist of it...

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