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.

  • $\begingroup$ 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! $\endgroup$
    – Matt
    Commented Jul 27, 2016 at 19:02
  • $\begingroup$ 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. $\endgroup$
    – Yvain
    Commented Jul 27, 2016 at 22:24


You must log in to answer this question.

Browse other questions tagged .