Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
Pause/Unpause with X-Box Controller
Post Flair (click to view more posts with a particular flair)
Post Body

I have the following problem:

Trying to pause/unpause with x-box controller but unpause is not working, I am sure that it is just something small I am missing or have done wrong.

I am not receiving any errors

I am trying to:

Implement basic x-box control to pause/unpause the game

My current code

if (global.pause) exit;
//Get the player's input
key_right = keyboard_check(ord("D")) || (gamepad_axis_value(0,gp_axislh) > 0) ;
key_left = -(keyboard_check(ord("A"))  || (gamepad_axis_value(0,gp_axislh) < 0));
key_jump = keyboard_check(ord("W"))  || (gamepad_button_check(0,gp_face1));
if gamepad_button_check(0,gp_face2)
if (global.pause ==0)
{
global.pause = 1;
}
else
if (global.pause = 1)
{
global.pause = 0;
}

I have tried:

I used the basic info from Shaun Spalding's video which works for pausing the game but I can't find a way to unpause.

I have tried using various "if" statements, moving the == around and other things, I tried so many different things I can't even remember.

I am using:

GameMaker Professional GameMaker Language is GML

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
725
Link Karma
658
Comment Karma
10
Profile updated: 1 week ago
Posts updated: 1 day ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 years ago