neat-donk/state-test.lua
empathicqubit 34b4528953 Algorithm works kind of. It figures out how to go forward
and reset when dying. GUI is messed up. Enemies not yet
added to inputs.
2021-03-05 10:10:05 -05:00

20 lines
450 B
Lua

PARTY_X = 0x7e0a2a
TILE_SIZE = 32
print(memory.readword(PARTY_X))
function on_post_rewind()
print("Async?")
print(memory.readword(PARTY_X))
end
function movement(addr, val)
if memory.readword(addr) > TILE_SIZE * 20 then
local rew = movie.to_rewind("pool/PiratePanic.lsmv")
movie.unsafe_rewind(rew)
print("Sync?")
print(memory.readword(PARTY_X))
end
end
memory2.WRAM:registerwrite(0x0a2a, movement)