Grap and shoot ball to get points?

Is it possible to Make a game where “You” grab a ball, by pressing a key, that lies on the ground, and shoote it, for an example into a basket,with another key, and THEN get points?

Have a collision sensor at the bottem of your basket that only reacts to things that have property “Ball”. Give you ball a boolean property “Ball” and set it to true. Have another property called score, make this an interger property. Now have your collision sensor hooked up to a property actuator that adds 1 to you score everytime the collision sensor is touched by property “Ball”

Thank you :D… So, now I can get points… But how to grap the ball and shoot it?

sounds like your saying crap the ball lol, any way… hmmm if i was making it, i would make it like hungry hippos lol.

There should be a constraint out there that “locks” the ball to the empty and when a key is pressed, it could break the constraint and throw the ball? I’m an idiot with python so no help from me :stuck_out_tongue:

Somewhere out there is a script that attaches an object to the mouse cursor. You could probably adapt that, along with the MouseOver and MouseClick sensors, to grab an object and then release it.

It does not need to be the same ball.

Have one on the ground,
one in the hand and
one to fly.
just make the right one visible/invisible when needed.

This prevents some problems with parenting. Especially if you want to use physics with the flying one.

Hope this helps

Thank you for the replies :D. Maybe a phyton script would be good. Like the idea from Monster, but the problem would be, that if it wasz seperatet objects, you would be able to shoot a ball without picking it up… But thank you :smiley:

I’m not much good with python, but I bet a realtime parenting (as in, you can make and break a parent in real time) script could be made with getLocation and setLocation. I can’t test anything now (my brother’s using my blender computer), but I’ll give it a shot later.

Study this blend:
http://www.freefileupload.net/file.php?file=files/241106/1164329483/Pickup_Walk.blend
If you walk to the right then click and hold while pointing at the glass you can pick them up,
maby this could help you.

hahaha i made that… there no textures though?
i’ll upload the one with textures

http://www.box.net/public/jmogmnyjcr

Study this blend:
http://www.freefileupload.net/file.p…kup_Walk.blend
If you walk to the right then click and hold while pointing at the glass you can pick them up,
maby this could help you.

Thanks a lot :smiley: ill look at it right away :smiley: