Hi
i’m working on a script where i need to get a variable in python to be assigned to a PROPERTY in game blender, is this possible?
(amateur coder - please go easy! )
cheers.
Hi
i’m working on a script where i need to get a variable in python to be assigned to a PROPERTY in game blender, is this possible?
(amateur coder - please go easy! )
cheers.
Well… if i had a cube with a property called “prop” and I wanted my python script to work with it… I would do the following:
Create the following logic bricks for the cube:
Always ----- > Python: “script.py”
And in my script i would have written dis:
GL = GameLogic
c = GL.getCurrentController()
me = c.getOwner()
what’s important is this:
#load the property into a python variable:
foo = me.prop
you can access properties that way… and you can do viceversa too…
in any case, you want this:
me.prop = pythonvariable