Global not working properly

I have no idea what is wrong with this. Do global blocks just not work as I thought?

What’s happening is that an input is being sent to the Number (from the Switch) setting it to -10 for example. (The timer is just to slow things down) Then the timer goes off, when the output goes into the other Number it goes to -10, but when it goes into the Global it sets it to 0 (Its starting value is 30). The only reason I can think of this happening is that there is another Global of the same ID somewhere, but I’m pretty sure that I have only used it 3 times so far.

Here’s the game if this helps. It’s in the third level in the Enemy object in the Enemy Attack bundle.

1 Like

when I test it it gets to 10. This adds up because you have two “Enemy” objects in the level so -10 is subtracted twice from 30

I completely forgot I had the 2nd one in there, I was testing some different things before. I’ll change that and see if that fixed it.

1 Like