Yep. Also, be sure to initialize them to something invalid like -1 to be sure you don't incorrectly get a match on the first use.
I'm just setting them both to the Current screen anyways at first. :p
You don't need a separate test, actually, just a change to one condition:
Code:
if (SomariaCheck == 1 && CurrScreen == LastScreen && CurrMap == LastMap)
I just realized, though... If you leave the screen and come back, you'll be on the same screen and map, but the block will be gone. This could be a bit tricky, actually...
Actually... That's what it's supposed to do. :p
Almost: it's !=
Darn it! XD
For efficiency? Well, you don't really need to set it to 0 at all, since you know you'll just be setting it right back to 1 anyway. I say just check them along with SomariaCheck as above, since they're all part of picking from the same set of actions.
Efficiency's not a big concern here. Unless you have a ridiculously CPU-intensive way of checking, you won't even notice a difference between two methods.
Okay, if you say so!
Hm. Well, again, I'm not entirely certain how you want the script to work. You may want to change the values of the CmbR
X variables when the block is placed, but that's only if you want to change it back to what it was before.
More importantly, there's the question of what to do if the block is pushed. Then you don't know where it is anymore, so you can't replace it. The only solution that springs to mind is to use a unique combo for the created block, so you can scan the whole screen for it and be sure whether you found it or not.
Actually, the "CmbRX variables are the reset combos, hence the "R". There's a new and reset variable for each thing I modify on a combo. It's easier to keep track of variable settings that way.
Then again, I'm not sure what would happen if you used the cane while the block was in mid-push. That might be a serious problem.
Quite. O_o