Updating Arrow component relX property

Hey guys,

I must be going crazy, I’m trying to get an arrow shape to move across the screen depending on what direction a conveyor is traveling. I have a property change script running on a timer with this code:

if event.propertyName == "Value": forward = int(system.tag.getTagValue("Kill Floor Main PLC/Inverter Tags/Forward Run Inverter 1")) reverse = int(system.tag.getTagValue("Kill Floor Main PLC/Inverter Tags/Reverse Run Inverter 1")) xDistance = event.source.parent.getComponent('Arrow').relX if forward == 1: if xDistance < 580.0: event.source.parent.getComponent('Arrow').relX = xDistance + 5.0 else: event.source.parent.getComponent('Arrow').relX = 30.0 if reverse == 1: if xDistance > 30.0: event.source.parent.getComponent('Arrow').relX = xDistance - 5.0 else: event.source.parent.getComponent('Arrow').relX = 580.0

but no matter what I do the arrow will not change position. Did I do something stupid that I can’t see ? I’m not sure why it’s not working…

The first line should be:if event.propertyName == "value":

Oh my god… so close! I actually tried that before but apparently it doesn’t work in the designer, I had to publish the project and then it worked in the client. Thanks!

Edit: It does work in the designer in preview mode, I didn’t try that either… :blush: