Go to footer

AutoHotKey and Trackbuilding

The central place to find tutorials and tools for all aspects of RPG

AutoHotKey and Trackbuilding

Postby AlexUSA » 05.08.2014, 23:28

One issue I ran into with the RPG track editor was that, since I'm on a laptop, I lack some of the keys connected to the block shortcuts (mainly rotating and resetting the blocks), like how was mentioned here:
Roman4r wrote:Anyone know if it is possible to change the controls of the editor?
My problem is that I play with my laptop, with no part of the calculator keyboard and keys...

I found a solution to keymapping problems: AutoHotKey. http://www.autohotkey.com/
It's essentially scripting to remap keys: I'm still new to programming, but I could use it to make what I needed.

I can offer to make separate .exe programs for whatever you want the keymappings to be, or also just get AHK and then modify it how you want to. If it's OK to post, I can try to make a link here to the .exe that uses the script below. (And does anyone know of a good place to host .exe files that doesn't think it to be a virus? xD )

It is setup that the mappings will apply to Trackmania, but will not be active or interfere outside of Trackmania.
What I use to fix my mapping issues:
;For Trackmania RPG, by Alex

;AHK general script
#SingleInstance force

;Keys will only apply when the ManiaPlanet window is active

#IfWinActive, ahk_class ManiaPlanet
;Rotate block horizontally by holding the middle mouse button and press the left or right arrows
~MButton & Right::Send {NumpadAdd}
~MButton & Left::Send {NumpadSub}
;Reset the block by pressing the middle mouse button
~MButton::Send {NumpadDiv}
;Adjust the height of the block, same as pressing Q
~MButton & Up:: Send {Q}
;Randomly spin the block in all directions
~MButton & Down::
Random, rand1, 1, 25
Random, rand2, 1, 25
Random, rand3, 1, 25
Loop, %rand1%
Send {NumpadAdd}
Loop, %rand2%
Send {Left}
Loop, %rand3%
Send {Up}

;End of script specific to Trackmania

Maybe it can be used in other ways? AutoHotKey seems versatile, but I don't know what else could be of help.
Last edited by AlexUSA on 18.12.2014, 22:41, edited 1 time in total.
User avatar
Posts: 10
Joined: 05.08.2014, 06:24

Re: AutoHotKey and Trackbuilding

Postby ZiZa » 06.08.2014, 14:28

Hey! Thanks for sharing this, could be quite helpful for a few. So if anyone modifies/creates a new script, just post it here. Once we have a nice set of functions i can set up a tutorial for the titlepack blog

Posts: 144
Joined: 08.10.2012, 19:46

Return to Board index

Return to Tutorials & Tools

Who is online

Users browsing this forum: No registered users and 1 guest