d0sboots / PerfectTower

AI Scripts and Utilities for Perfect Tower II
Apache License 2.0
36 stars 11 forks source link

Layer regen faster than script #1

Closed Cloudninjakip closed 3 years ago

Cloudninjakip commented 3 years ago

Sometimes when I run the script, a layer might regen while the script is mining, which causes it to hang since it won't stop the script until it has mined all the layers in a tab, but it also stops mining before the script itself stops. Edit: from what I've seen, this may be an issue with how fast turbo exec runs the script, in comparison to how fast the game is capable of mining the tiles.

d0sboots commented 3 years ago

I'm not sure I completely understand the scenario you're describing. When you say "hang", do you mean that it gets stuck on a layer before the last one, or something else?

It is known that if you use this with turbo exec and there's a lot of unmined layers ready, the whole game will hang for a second or two when you enter the mine, because it's furiously mining all the layers between frames. There's not much I can do about that beyond deliberately slowing it down.

d0sboots commented 3 years ago

Oh, the other reason why I'm confused: Half the script (the part that digs tiles) doesn't exit until you leave the mine. So in that sense it never really stops mining, only the layer-generating part stops.

Cloudninjakip commented 3 years ago

ahh ok