button for save game, load etc.

Started by PsychicHeart, Thu 23/06/2005 07:16:16

Previous topic - Next topic

PsychicHeart

how would i go about assigning buttons to things i want to do.
My GUI is stuffing around so that's out.
I need:

Ctrl+S (or similar) : Save Game
Ctrl+L (or similar) : Load Game
Ctrl+B (or similar) : Go Back to main menu

thanks,
Blake
Formerly known as Flukeblake, Flukezy etc.

Gilbert

Look up in the global script and find the function on_key_press(), and add lines like:
Code: ags

if (keycode==2) { //Ctrl-B
  //do whatever you need for pressing this key here
}

You can look up the keycodes from the manual:
Reference --> ASCII Code Table

For your convenience the keycodes for Ctrl-B, Ctrl-L and Ctrl-S are 2, 12 and 19, respectively.

SMF spam blocked by CleanTalk