Keep Bouncing balls.

First I would like to say that, im sorry if I repaet this question, but Iv had allready been searching in the forum, and no good answer came up. So here it is:

I wanna Create a some kind of Bouble-Trouble 3D game. (Try Bouble trouble here: http://www.miniclip.com/games/bubble-trouble/en/)
And I dunno why, but I can’t make the balls too keep Bouncing.

BTW: Im a pretty noob when it coms to game energine… so keep it simple, if it can be kept simple. :smiley:

Thanks:D

Well, you could start out by attaching a collision sensor to the ball with a motion actuator with a z force. The problem is that the force is supposed to get less over time. To do that you could use a simple python script which changed the force settings.


cont = GameLogic.getCurrentController()
motion = cont.getActuator("motion")
force = motion.getForce()
if force[2] > .1:
     force[2] -= .1
else:
    force[2] = 0
motion.setForce(force)
GameLogic.addActiveActuator(motion,1)

You need a collision sensor named anything, since it’s only needed to start the script.
and a motion actuator named “motion”. Change the ".1’ to whatever works but change both of them.

It’s really a simple physics problem needing a high bounce type property, but I don’t know how to do that. Your probably better off using collision and force, though, because if it hits the whatever it divides into smaller balls.

I’ve got an easier solution for you. Select the ball, then go to the materials buttons. You need to give your ball a material, then in the materials buttons click DYN (it’s under the color shaders I think). In DYN, set the restitution setting to 1.0. Now do the same for the floor. The ball should keep bouncing all of the time. If you want the bouncing to taper off, lower the settings a bit on one or both. Tweak it until you get the desired results. I wish you the best with your game. I had been thinking of doing a clone of that game a while back, but I never got around to it. (I played a different version with a boy who looked like Ness from EarthBound.)

I figured there was a solution like that, thanks Blendenzo.

wow!

cool one blendenzo!

umm here is another as well

made a floor mesh… give it a property named “floor”…

select your ball and add a collision>floor AND motion>GLOBALforce Z +20

let her ripp!
and whenever the ball hits anything with the floor property it gets a boost up by +20…

to make anything weightless just make a :
always AND motion force globalZ +9.8…

add more to make it float up, and less to make it sink down…
9.8 is the neutrail force.

Thank you really much!