Z
zendraw
Guest
so im setting the controlls as global variables, and then set temp variables then use those in the code.
for some reason after i start the game, then chat with someone on steam, then go back to game, these controlls dont work. but functions like keyboard_check_pressed(vk_somthing); works fine.
and on another game of mine i think the controlls are done directly with the functions and inbuild variables, not global variables like this, on that game the controls work fine.
what is steam doing or what is going on with these global vars that stop working?
GML:
//controlls
global.kright=ord("D");
global.kleft=ord("A");
global.kup=ord("W");
global.kdown=ord("S");
Code:
var mh=keyboard_check(global.kright)-keyboard_check(global.kleft);
var mv=keyboard_check(global.kdown)-keyboard_check(global.kup);
and on another game of mine i think the controlls are done directly with the functions and inbuild variables, not global variables like this, on that game the controls work fine.
what is steam doing or what is going on with these global vars that stop working?