I'm new in this forum and I'm creating a game using the BGE and I would like to add a special skill to my character : to swallow any object with the propety P and then later, to spit out these objects (but I'll see this part after).

So, here is the "script" I was thinking of for the first step of my mechanic :

if raycast and mouseclick are actives : hitObject parent to Player + hitObject not visible.

But actually I don't use very often the python scripts, and I don't know the actual code lines to use to make it work, so it would be nice if someone helped me.

Thanks to anyone who will answer me, and if I wasn't clear enough please ask me to explain.

  • welcome to B.SE! Keep in mind that this is not a forum, so it works a little differently than you might expect. You're good so far, but it'd be helpful if you had an actual question as your subject line. We're glad to have you! – Matt Jul 27 '16 at 19:02
  • Go on to follow some basic python tutorials first, then you can get to use the BGE module. Have a look here blender.stackexchange.com/questions/57573/… this was actually about adding objects using ray and mouse but you can see how to implement the code in your scripts. – Yvain Jul 27 '16 at 22:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.