- Title: Customizable Controls Example
- Description: How to map keys and use an ini to save them...
- GM Version: GM7pro / GM8pro
- Registered: Yes (Should be compatible with GM6 and GM7Light)
- File Type: gmk and ini files (zipped)
- File Size: 0.31mb
- File Link:
- File Link GM8:
This example is an introduction to customizable controls and basic use of ini files and is recommended for intermediate users. It is for anyone who wishes their game to have a user defined keys menu and should work in GM6 and GM7light but I have not tested it so it may be that GM7pro is necessary.
There are two objects (one for mouse and another for keyboard, they are both basically the same, only the way of selecting the keys to map changes) which use arrays to define the keys and then save the values to an ini file. The ini file must always be located in the same directory as the game file.
Before starting to modify this please open the ini file in a text editor to see how it is structured, then read through all the codes and comments to make sure you understand everything.
This can be merged into any game (delete everything except the keyboard_object that you want to use and the scripts) but will need modifying to adapt to your needs. Pay particular attention to the arrays and drawing options...
Thank you for downloading this and as always, no credit is necessary but would be apreciated! Oh, and please comment if you download this...
EDIT: Kvegas83 has provided an optimised (and easier to change) script here... Thank you!
Edited by Nocturne, 27 June 2013 - 08:54 AM.