http://www.mediafire.com/folder/a98ay2xviea17/Joystick_Lua should have all the edited files needed. You're lucky I didn't actually delete it :P Lemme add some comments to that superswim script so you can actually tell what to edit.
--[[
states:
1: start
100: fastest
101: main superswim states
102: down 1 frame
]]
fastestFrame = 10000000000
fastestSpeed = 0
function checkAir()
checkFinished()
print(tonumber(memory.readfloat(0xabcfcc))) --speed address, changes every map
if memory.readword(0x3bdc62) == 0 then --air address, shouldn't ever change
return false
end
if tonumber(memory.readfloat(0xabcfcc)) > -50 then --speed address, changes every map
return false
end
return true
end
function keepSwimming()
while checkAir() do
joypad.joystick(128,128) -- neutral stick
emu.frameadvance()
end
end
function getToSpeed(x)
while tonumber(memory.readfloat(0xabcfcc)) > -x do --speed address, changes every map
if math.mod(emu.framecount(), 2) ~= 0 then --if odd frame, stick down right
joypad.joystick(0,186) --right
emu.frameadvance()
else --if even frame, stick down left
joypad.joystick(255,186) --left
emu.frameadvance()
end
end
end
function getToFrame(x)
while emu.framecount() <x> -1 then --speed address, changes every map
if emu.framecount() <fastestFrame> 1000) and running do --start after loading the first state
if emu.framecount() > fastestFrame then running = false end
if math.mod(emu.framecount(), 2) ~= 0 then --if odd frame, stick down right
joypad.joystick(0,186) --right
emu.frameadvance()
savestate.save(101)
joypad.joystick(228,0) --first turn around, not straight to where you wannna go, based on previous input
else --if even frame, stick down left
joypad.joystick(255,186) --left
emu.frameadvance()
savestate.save(101)
joypad.joystick(10,0) --first turn around, not straight to where you wannna go, based on previous input
end
emu.frameadvance()
joypad.joystick(128,255) --opposite of direction you want to go
emu.frameadvance()
savestate.save(102)
keepSwimming() --first frame leaving
savestate.load(102)
joypad.joystick(128,255) --opposite of direction you want to go
emu.frameadvance()
emu.frameadvance()
-- savestate.save(103)
keepSwimming() --second frame leaving
savestate.load(101) --restart loop
end
emu.frameadvance()
if running == false then emu.message("HOLY SHIT IT FINISHED!") end --most important line in the code, do not remove.
end
should make more sense. A couple things, unlock your camera and move it slightly up. If it doesn't work the camera is too high or low. This script only works for moving you forward, so all the joysticks that are left, right, or turn arounds will have to be edited appropriately. This can get you diagonally 3 islands, or about 4 islands N, S, E, W.
And here's the route if you're interested:
https://docs.google.com/document/d/1wttBXGQpVcnWp8xiAun4B0VL34vF0Au8KpLmkc1qK5s