Ugh... so, the worst thing happened. Ok, the second worst. The worst thing would be loosing your world files.
The second worst thing that I've been fearing is that I'd realize that the issue with being able to teleport off boards after combat has been initiated is still possible.
I did some test scenarios and could make it happen consistently with the right enemy placements
Been trying out some things this evening and I've found a fix. But it means that I'll have to manually edit EVERY SINGLE ENEMY in the entire game!
I'm just going to commit seppuku instead. Ok, maybe not. But this one is gonna be rough to fix.
The issue is that enemies are able to trigger combat before they really get started, but they still carry out the rest of the script while the player teleports off screen. They roam around, then commence combat when the player is within range, setting "encounter" to 1, which is a counter that is used
to lock other enemies and prevent the player from using screen exits.
But somehow, no matter what, the enemy scripts manage to trigger combat and carry on that script, while simultaneously being slow enough to set the "encounter" variable to 1, that you'd have ~½ a second to touch an exit. So you'll teleport off the board, but "encounter" remains at 1 and this breaks everything, since it is intended to keep enemies from moving and teleports from activating. I can't just set "encounter" to 0 on "justentered" as a work around. It's hard to explain. I'd have to upload a demonstration to show why.
I tried upping the amount of commands in the global robot. Didn't make any difference.
Now I've tested a double fail-safe kind of thing. The enemy I'm using for the test checks to see if a new "lockcombat" variable is = 1 and will continue to patrol if so. The screen exit sets this counter. So the enemy sets a counter to block off the door and the door sets a counter to block off the enemy. Which ever is first to trigger decides if there will be combat or a teleport. I haven't been able to break this after many tries, so that's good. But... I'm gonna need a very large bottle of alcohol to get through this huge an amount of tedious editing. HUNDREDS of scripts. Urgh...
This post has been edited by MicMotorhead: 25 May 2020 - 09:51 PM