Hey there, this might be a me issue but I can’t figure it out. When I unpause for the first time all other elements of draw ui in different objects shift upwards. Any idea what might be causing that?
Your other objects might be calling their create events again when it pauses/unpauses. So this may cause your text variables to reset. Another reason for the shift upwards is a shift in the view_port's [x,y].
Make sure you put a 'pause = false;' when you use the Return key to return to the game, otherwise you'll have to hit Esc twice in order to pause again!
___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Create Event for object obj_pause:
Variable obj_pause.n(100040, -2147483648) not set before reading it. at gml_Object_obj_pause_CreateEvent_1 (line 46) - bstring[ n ]= " RESUME "; n++; ############################################################################################ -------------------------------------------------------------------------------------------- stack frame is gml_Object_obj_pause_CreateEvent_1 (line 46)
I guess you are using GMS 1.4, Just type n = 0 in the create event and the issue is as good as gone. Also if you are using a font an not sprites just remove the first font code then on the second you can just define the font name. I hope this solves your issue.
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
How can i add sub menus?
I made some changes to go to the menu, but when it does the audio stops, it only starts playing again if I pause and press resume.
/// Select Button ///
if ( kConfirm ){
if ( pause ){
// audio_play_sound( sound[1], 0, 0 );
switch( b ){
case 0: // Resume
alarm[0] = game_get_speed(gamespeed_fps)* 0.1; //resume timer
break;
//case 1: // Opções
// global.origin_screen = "jogo";
// room_goto(rm_config);
//break;
case 1: // MainMenus
room_goto(rm_menu);
alarm[0] = game_get_speed(gamespeed_fps)* 0.1; //resume timer
break;
case 2: // Exit
switch os_type
{
case os_android:
android_game_end();
break;
default:
game_end();
break;
}
break;
}
}
} //end Confirm statement
}
Hey there, this might be a me issue but I can’t figure it out. When I unpause for the first time all other elements of draw ui in different objects shift upwards. Any idea what might be causing that?
Your other objects might be calling their create events again when it pauses/unpauses. So this may cause your text variables to reset. Another reason for the shift upwards is a shift in the view_port's [x,y].
It actually turned out to be the draw_set_valign that I forgot to set in my draw UI event, so my mistake that I was overlooking,
Make sure you put a 'pause = false;' when you use the Return key to return to the game, otherwise you'll have to hit Esc twice in order to pause again!
Came to the comments here to find the fix for this exact thing. Thanks alot.
Hiya, i'm trying to change the font, but it says
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object obj_pause:
Variable obj_pause.n(100040, -2147483648) not set before reading it.
at gml_Object_obj_pause_CreateEvent_1 (line 46) - bstring[ n ]= " RESUME "; n++;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_pause_CreateEvent_1 (line 46)
I guess you are using GMS 1.4, Just type n = 0 in the create event and the issue is as good as gone. Also if you are using a font an not sprites just remove the first font code then on the second you can just define the font name. I hope this solves your issue.
oh okay no problem. I'm glad i could help
Appreciate the helpful tips Kcfresh, you a real bro!
thanks, I couldnt have helped without your useful asset. I learned a lot from it.
Yo great to hear! Never stop learning !(:
after i download it, where do i import it into GMS as a .gmz file?
I'll be updating this asset very soon & uploading it on the GMS market place for easier importing ~
Pretty sweet asset you got there :D
BRROOO TY