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:
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?
Develop games in your browser. Powerful, performant & highly capable.
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...