Not allow to show some GUIs in a specific room

Started by Resource09, Thu 10/10/2019 23:59:14

Previous topic - Next topic

Resource09

Hello,
I have this problem: I have some GUIs like inventory, save and load GUIs and a general panel that appear when pressed specific keys (ESC, TAB, F5).
I want to disable the keypress in some specific room, for example in title screen, and allow them again when the game starts.
Someone know the solution?

Thank you

Cassiebsg

You can add and if to the on_keypress function.

like

Code: ags

function on_key_press(eKeyCode keycode)
{
  if (keycode == eKeySpace)
  {
    if (player.Room==1) return; // as in, do nothing.
    else // add the keycode her.
  }
}
There are those who believe that life here began out there...


SMF spam blocked by CleanTalk