You are not logged in.
Pages: 1
Here's the LUA script I used while playing Metroid Prime Hunters on DeSmuME. It maps most of the touchscreen-only controls to keyboard keys. (If you want to use a gamepad instead, then you will have to use some J2K software to map those keyboard keys onto your gamepad. LUA can't read the gamepad itself.) If you play with the "Dual Mode" control scheme, then you can now experience all of the gameplay without using the touchscreen. (You will still need the touchscreen in the main and ship menus.)
This is what the script does:
- M: Toggle Morph Ball
- V: Toggle visor
- O: Click where the "OK" button is in scans and messages
- L: Click where the "<" button is in scans and messages
- R: Click where the ">" button is in scans and messages
- W: Cycle through the main weapons
- P: Previous subweapon
- N: Next subweapon
And here's the script:
cooldown=0
weapon=0
subweapon=0
while true do
local key=input.get()
if key.M then --Morph
stylus.set{x=231, y=167, touch=true}
end
if key.V then --Visor
stylus.set{x=128, y=173, touch=true}
end
if key.O then --OK (in scans and messages)
stylus.set{x=128, y=142, touch=true}
end
if key.L then --Left arrow (in scans and messages)
stylus.set{x=71, y=141, touch=true}
end
if key.R then --Right arrow (in scans and messages)
stylus.set{x=185, y=141, touch=true}
end
if key.W and cooldown==0 then --Switch weapon (beam->missile->subweapon->beam)
cooldown=20
weapon=(weapon+1)%3
stylus.set{x=85+40*weapon, y=32, touch=true} emu.frameadvance()
stylus.set{x=85+40*weapon, y=32, touch=true}
end
if (key.P or key.N) and cooldown==0 then --Switch subweapon (previous and next)
cooldown=20
weapon=2
if key.P then subweapon=(subweapon-1)%6 end --previous
if key.N then subweapon=(subweapon+1)%6 end --next
subX=93+25*subweapon subY=48+25*subweapon
stylus.set{x=232, y=34, touch=true} emu.frameadvance()
stylus.set{x=232, y=34, touch=true} emu.frameadvance()
stylus.set{x=subX, y=subY, touch=true} emu.frameadvance()
stylus.set{x=subX, y=subY, touch=true}
end
if cooldown>0 then cooldown=cooldown-1 end
emu.frameadvance()
end
Offline
Is it possible to map the screen to controller buttons?
Means instead of key.M to use button.1 (directinput).
Offline
no.
Offline
Is it possible to map the screen to controller buttons?
Means instead of key.M to use button.1 (directinput).
You can map touch screen locations to controller buttons (or any other buttons for that matter) on the Mac version.
Offline
Pages: 1