I’m building a “Door” Prototype. Inside there’s a dynamic property called “DoorStatus”, which represent the … well… door status
0 means the door is closed
1 means the door is open
2 means the door is destroyed.
So my DoorStatus dynamic property is configured this way:
Is Numeric: CHECK
I want to switch from 0 to 1 and viceversa with the same key command, but do nothing if the door is destroyed.
So i’ve made a Open / Close command that set value directly with this expression in the New value field:
To me, this line means that
if DoorStatus is 0, it returns 1
else if DoorStatus is 1, it returns 0
else it returns the current value of DoorStatus (so, not changing it).
The same expression put in a calculated property (NextDoorStatus) works as expected.
Why i don’t get the expected results and instead it always returns 1?