• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Show message control with a gamepad

D

dcx

Guest
Hi,

I only want to show a message and pause the game as the command show_message does. But my game will be played with a controller and i don't find a way to "click" on OK to remove the show message. Maybe it's not possible. There is a simple way to show a message and wait a button to be pressed?

For exemple, a rock paper scissors games, show the winner, then continue.

GML:
if(global.choiceP1 == 1) && (global.choiceP2 == 1){
    switch wait_script() {
      case 1: wait = 60; break
      case 2: global.choiceP2=0;
    global.choiceP1=0;
    show_message("Equality");
    global.animationP2=99;
    global.animationP1=99;
    global.game=1;
    state_code = 0;
    break
    }
}
 
You'll have to move away from show_message(). I'd recommend doing so even without any gamepad support because the function isn't exactly appealing or professional.
 

kburkhart84

Firehammer Games
As said above, show_message is not a very good solution. You should really have your own dialog, pause the game yourself, etc... Then, it is easy enough to have the gamepad control the continuing. Now is a good time to go ahead and learn about pausing the game, etc... anyway as you may/will need that for other situations, like a pause menu, etc...
 
D

dcx

Guest
I know for show message, it's only for me and friends. I saw some tutorial for pause and dialog, but i was thinking there maybe is a fastest/simpler way to do it.
 
D

dcx

Guest
Ok, i use a kind of pause to show my message in a sprite. It's simple and it work for me.
 
Top