
Originally Posted by
Volnaiskra
Well, if hardcoding the value works, then there's nothing wrong with the array or with connecting to it. The problem then most likely lies with the variables you're using in your code, or in what order you're manipulating and reading them.
Try using the 'output to debugger' action as I suggested. My guess is that it will tell you that the values are 0,0. If this is the case, then your condition will test for the value at x=0, y=0, which is probably 0 because you've probably never used it. It'll change it to -1, but that's useless to you because you're not interested in x=0, y=0. So the event will trigger, but it'll appear to you like nothing's happening. That seems consistent with what's been happening.
The other benefit of outputting to debugger is that you'll see how many times the loop is running. If my above guess is correct, then the loop will only run once, because it will test 0,0, see that it's set to 0, then set it to -1, then it'll repeatedly test the same spot (0,0) but this will now be set to -1 so it will no longer execute the actions.
If indeed the values in your code are 0,0 then it's just a case of working backwards, investigating every step along the way, until you find the reason why they're not being set the way you expect them to be.