• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Weird glitch doesnt make any sense.

R

RylanStylin

Guest
GML:
if(lives < 1) and (room == rm_game){
            var c = c_yellow
        draw_text_transformed_color(21,944,string(score),1,1,0,c,c,c,c,1);
        draw_set_halign(fa_center)
        draw_text(room_width/2,100,"GAME OVER")
        draw_text(room_width/2,200,"YOUR SCORE: "+ string(score))
        draw_text(room_width/2,300,">>PRESS ENTER FOR MAIN MENU<<")
        draw_set_halign(fa_left)
        if(keyboard_check_pressed(vk_enter)) room_goto(rm_start);
}
This code completely breaks the code of my game and i have no idea why. it works on version one of this project, but not on version 2.
it works just fine without this code, but when i insert this code into a draw function on my obj_game object, my player sprite disappears. ??????? nothing about this makes any sense and i honestly kind of think its a game maker problem..

UPDATE: If i create a second draw event in a different object, then the sprite disappears
 
Last edited by a moderator:
R

RylanStylin

Guest
UPDATE: If i create a second draw event in a different object, then the sprite disappears
 
R

RylanStylin

Guest
GML:
switch(room){
    case rm_start:
    var c = c_white;
        draw_set_halign(fa_center);
        draw_text_transformed_color(room_width/2,64,"GALAGANT",3,3,0,c,c,c,c,1);
        draw_text(room_width/2,128,
@">>Press ENTER To Start<<
>>Press TAB For Controls<<
>>Press ESCAPE To Quit<<"
);
        draw_set_halign(fa_left);
        if(keyboard_check_pressed(vk_enter)) room_goto(rm_game);
        if(keyboard_check(vk_escape)) game_end();

        if(keyboard_check(vk_tab)){
            var c2 = c_blue
                draw_set_halign(fa_center);
                draw_text_transformed_color(room_width/2,256,
@"A/D = Movement
SPACE = Shoot
Don't let your guns overheat!
.......
Current Highschore: 84100
Think you can take the crown?
.......
Copyright Rylan Yancey
Nov 2020",
            1,1,0,c2,c2,c2,c2,1);
    }
    
        break;
    
    case rm_game:
    game_end();
            break;
}
aight so ive been trying it even more. When i am in the game, and i enter rm_game, the game doesnt end (as it should becuase of the case rm_game: game_end();. Soooo i must be doing something wrong with my switch statement?
 
R

RylanStylin

Guest
figured it out. I didnt have my obj_game placed in rm_game so the code didnt apply there
 
Top