Anyone have ball bouncing code I can use? Not the bounce code that is already in MMF. I need something that can bounce off ground, wall that is somewhat real.
You mean like realistic gravity-acceleration bouncing? Those are simple enough to make. Just take some stuff from a basic physics book and convert it into MMF code .
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Well, I meant something like...
Every 0.01
Flag 0 is on
Ball: Set Y position to Y position + Alterable value A
Set Alterable Value A to Alterable Value A + 10
Just make sure flag 0 is on when it goes down. Convert the Alterable Value A to a negative value (with a few mods for energy loss). Then use another flag for when it goes up and do the deceleration.
There, you get very easy vertical bouncing ball acceleration. And it's even realistic. You can probably do something similar for horizontal acceleration.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Omg stop confusing the poor little guy This method isn't the best, but it's the way it works:
Every 0'00'10: Add 1 to Alt A of ball (This makes the ball gain downwards speed)
Always: Set Y position of ball to Y position of ball + Alt A of ball (This actually moves the ball)
Ball collides with horizontal background: Set Alt A of ball to Alt A of ball * -1 (This reverses the downwards speed, so it goes up)
thanks for the help, but I found the movement extension and it has it all there . I'm just too lazy to click it myself, lucky there's allot of usefull extensions.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.