Jump to content
Double Fine Action Forums
Sign in to follow this  
Wilco

Any way to change the key mapping?

Recommended Posts

Hey all,

Has anyone found a way to change the key mapping in Hack 'n' Slash? Not really easy to use WASD on an azerty keyboard...

Thanks!

Share this post


Link to post
Share on other sites

You can use the normal arrow keys if you have them, although the action keys won't be all that convenient.

Otherwise unfortunately the keys are hardcoded in the game scripts. However since its all in the lua part you can theoretically decompile the files and replace the mappings. For example a replaced direction mapping in HeroCharacter.lua would look like:


 if isDown(MOAIKeyboardSensor.UP) or isDown("z") then

   ny = ny + 1

 end

 if isDown(MOAIKeyboardSensor.DOWN) or isDown("s") then

   ny = ny - 1

 end

 if isDown(MOAIKeyboardSensor.LEFT) or isDown("q") then

   nx = nx - 1

 end

 if isDown(MOAIKeyboardSensor.RIGHT) or isDown("d") then

   nx = nx + 1

 end

However you'd need to go change a few other files as well since that if that's the bindings you use it would stuff up the usual binding of the 'Q' key, which is used in Inventory.lua to trigger the cable item and possibly in a few of the Dialog functions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...