Script running twice help

Hello, a python newbie here.
I have a property attached to an object called ‘position’ I have some logic bricks set up line this;


[mouse, 1, 0, f:5, left button]    [mouse, 1, 0, f:5, mouse over]
                               \   /
                               [AND]
                                 |
                  [property, add, prop:'position',4]

Then I have a property changed sensor which executes a python script which simply prints the value of ‘position’. The property sensor looks like this


[property, 0, 0, f:1]
           |
       [python]

Whay should my python script be printing: 0, 0, 4, 4, 8, 8, 12, 12… instead of 0, 4, 8, 12
Thanks!

Post your script

import GameLogic
cont = GameLogic.getCurrentController()
own = cont.getOwner()
print own.position

That’s it

1 Like