Owner & Collision

Hi, everyone… :slight_smile:
I’m a new user of Blender, so I’m still green…

So… There are some things I want to ask:

  1. The code:
    cont = GameLogic.getCurrentController()
    own = cont.getOwner()
    Does own refer to the object? (I mean the object that’s linked to the python script)
    How if there are 2 objects linked to that script?

  2. I want to make a collision in Blender…
    Like in Macromedia Flash, collision = hitTest()…
    Example:
    My hero is A, and the villain is B…
    If A touches B, so B will disappear…
    So… What should I do to make that happen in Blender?

Your help will make me very very happy… :slight_smile:

for the second question u dont need a script all u have to do is give the hero a property of die set it to int ir float then select the villian give it a sensor select collision and tipe in the property box die then add a controller then add an actuator select edit object in that select end object.link the logic bricks toghter and thats all check my page for pictu:spin:res

Wow!
Great! It works!
Thank you so much…

Oya… How about my first question? Is it true, that own refers to the object?

for the second question u dont need a script all u have to do is give the hero a property of die set it to int ir float then select the villian give it a sensor select collision and tipe in the property box die then add a controller then add an actuator select edit object in that select end object.link the logic bricks toghter and thats all check this out

/watch?v=20xCDyjW74Y"]http://www.youtube.com/watch?v=20xCDyjW74Y

theres a video on how it should look there[URL="http://www.youtube.com

i think so im only just getting into using scripts if you have any more question just ask me

Oki doki no problemo… :slight_smile:

Owner refers to the object that is connected to the script. If to objects are using the script, it’s like two different scripts running independently.

Thank you for the answer… :slight_smile:
I’ll try…
And I’ll ask you if I have some trouble with that…