how I can run or get to the method and function inside generated objects ???
Note: the generated mesh(Cube) has a script which has a method in side class called move !
how I can run or get to the method and function inside generated objects ???
Note: the generated mesh(Cube) has a script which has a method in side class called move !
this is pretty simple to do
here is a blend that shows how to do it.
mutate-KX_GameObject.blend (518.8 KB)
Thank you very much for your reply and I`m sure this Technic will help me a lot’s in the future. But I looking for a way to call a method and pass some parameter"s and information from a spawner directly. (if this way exist )
use object properties. do obj["prop"] = thing
where obj
is the newly created object returned by obj = scene.addObject()
here is another way.
mutate-KX_GameObject-WASD.blend (513.0 KB)
the reference to the spawned object is stored in the Mob class, that gives access to the spawned objects attributes from inside the class.
while True:
print('Thank you !!!')
good trick