Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Allright, I already got the common event method figured out. I’m thinking of a way to have the script wait for the key to be pressed; if I’m inside the menu (I usually use labels for picture menu), the script should wait for an input before going to a new label, I was thinking of a cycle but could I don’t think it’s ideal... is there some similar script? Something like a “wait for (UP, Down) key”, then if one is pressed proceed with the script?

(+1)

I believe you have to use the loop event command. This is the way to go.
When the key is pressed, you break the loop and go to the new label.

Ok, I'll try with loops then, not my ideal solution but it could work. Also, is there any keyboard equivalent for Input._gamepadStates ? So that I can make a check to see if a keyboard key is pressed? I tried with input._latestButton but it does not work. I'd like to make a global event mapper for both keyboard and gamepad to recognize which button is pressed, but I don't want to make an event for each key. Where every button call the same event which recognize the input. Bind event to buttons is a bit akward for me because a button could be pressed to do more things, I'm trying to replicate a "configurable" key mapping.

(1 edit)

There is no equivalent for both the gamepad and keyboard.

But if you want to check if the keyboard or the gamepad is pressed, you can use a script call:


Edit: This way you don't have to create two pages for the two conditions.

But you can also do this with common events. I presume when you activate your picture menu, there must be something that tells that this menu is open. Maybe a switch?

So, you can put inside the common event for the key:

if the switch menu is on

Do this

else

do that