Here is the game I am working on, I know it is really boring but it is for a marketing project.
I have three doors (which in time will lead to another level), going over two of which change the value of the players “Cash”.
One (the law door) will diminish the users cash by 100, whilst going over the other (the DIY door) will give the user an extra 50 cash.
Now I’ve got the DIY door to work, and going over it increases by 50. But for some reason, the exact same mechanic doesn’t work for the law door?
It looks like what is probably happening is that when you touch the Law door, the expression is getting evaluated before the second value is updated to 100. You can probably fix that by rearranging the node positions (triggers run from left to right, outputs run top to bottom).
My suggestion is that you alter your logic, however. I think you should be able to get the effect you want in a simpler, more reliable way by doing something like this:
Create a single “Number” node and name it “Cash”, sending its output into your cash label.
When you touch the “DIY” door, have it send “50” into the “+” input of the “Cash” node.
When you touch the “Law” door, have it send “-100” into the “+” input of the “Cash” node.
Let me know if that’s not clear.
Perfectly clear. And your suggestion worked a treat - thanks man