Quantcast
Channel: Active questions tagged game-maker - Stack Overflow
Viewing all articles
Browse latest Browse all 189

Need help in GMS2 pls, trigger works again and save menu opens again, even though it should just close

$
0
0

I've run into this problem.

I have a save menu with two options: "Save" and "Return", which is selected by the option heart. When selecting the "Return" option, the option arrow going back to "Save" even though it should close the save menu(It seems that when menu is closing, the trigger works again and menu opens again, even though it should just close).

The second problem is that when you select the "Save" option, the "File saved" window appears, after which it does not disappear when im pressing "Z" key, and I do not understand what is the reason for these two errors, no matter how I tried to fix them.

It seems that I write the code correctly, but nevertheless it does not work.


Key Press "Z" Event:

if image_index = 0{instance_change(obj_saveconfirm, true);audio_play_sound(snd_save, 10, false); }else {if image_index = 1 {instance_destroy(); } }

Code that opens the save menu:

if place_meeting(x, y, obj_player) && keyboard_check_pressed(ord("Z")) && !instance_exists(obj_savemenu) && !instance_exists(obj_saveconfirm){instance_create_depth(x, y, -9999, obj\_savemenu);}

It seems that I write the code correctly, but nevertheless it does not work.I also used "keyboard_check_released" in code that opens the save menu, and menu is closing, but after half a second it opens again.


Viewing all articles
Browse latest Browse all 189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>