i wanna make variables… but dont knwo how
i did that example:
cont = GameLogic.getCurrentController()
own = cont.owner
sensor = cont.sensors['sensor']
x = own['level']
scene = GameLogic.getCurrentScene()
objects = scene.objects
gaga = objects['OBgaga']
if sensor.positive:
GameLogic.sendMessage( 'x' , '' , '')
own.endObject()
but it sends message “x” not the x variable (the count, which allways changin, if the level changes)
than i did that:
cont = GameLogic.getCurrentController()
own = cont.owner
sensor = cont.sensors['sensor']
x = own['level']
scene = GameLogic.getCurrentScene()
objects = scene.objects
gaga = objects['OBgaga']
if sensor.positive:
GameLogic.sendMessage( x , '' , '')
own.endObject()
with this my python doesnt work, becouse my spehere does not dissapearing.
please help with variables i need to send to everybody the message, which means the “x” - the variable.
if for example i have property “level” by 2, than my x should be same =2.
and than i need that sphere would send message to all “2”, not the “x” letter
hope you understand