Chaning properties with python

I have tried this script to change the property on my object.

controller = GameLogic.getCurrentController()
sen = controller.getSensor(“sensor”)
sen.setValue(“10”)

Is this the right coding for change the property? Because it does not work :frowning:

To edit properties on an object:


cont = GameLogic.getCurrentController()
own = cont.getOwner()

#This assumes that the property is called prop...

own.prop = 1

Worked perfectly thanks :slight_smile: