Hi! I have a bouncy ball object that is effected by gravity(always add 1 to alterable value A and always set Y position of bouncy ball to Y of bouncy ball plus alterable value A) That I want to bounce, so I did: bouncy ball is overlapping with background, bounce, set alterable value a to 0 and set direction to up. But what happens is the ball bounces for ever! (infact they are bouncing away as I type this)
How can I make it so the ball bounces about 3 times, each bounce shorter than the last one until the ball is stopped on the ground?
Pete Nattress Cheesy Bits img src/uploads/sccheesegif
Registered 23/09/2002
Points 4811
7th September, 2003 at 11:05:30 -
try using a seperate alt value to denote the max bounce level. so you'd set it to say, 9, then subtract 3 from it whenever it hits a background, so it bounces 3 times before getting to zero. then alter your bouncing event so that it reads from that alt value so "Alt Value A = Alt Value B then set direction to x".
Multiply value A by -1 to change it into a minus number, to make it a different height each time, do something like this:
Active collides with background : Set value A to Value A * -1 +2