2019-07-10 04:39:29

Hi guys. So I added a logo to my game, and I don't want it to play if I don't want it to. I already declared an int variable that you can change to 0 if you don't want it to play the logo, and change to 1 if you want it to. The problem I am having is I am coding an options menu with the option to enable and disable the logo (change the variable). I don't know how I can do it. I am using the menu.bgt. I don't know if I have to use if (mres==1), or if (m.get_item_name(mres)=="then the name of the option. I just don't know. and whoever said to stop using bgt, I am not going to. So yeah don't know but if you can help, cool.

2019-07-10 05:09:44

Both is fine. get item name however is more reliable as you might mistake the item positions when doing mres==1 or so. Simply check when the item is "disable playing of logo" set the int to 0 and go back to the menu, and when it is "enable playing of logo" set the int to 1 and again go back to the main menu

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2019-07-10 16:47:24

But how do you make it where it saves your settings. When I hit escape in the options menu, it exits and doesn't save the settings. So don't know

2019-07-10 21:44:02

You need a saves system.

-
"There is beauty in simplicity."

2019-07-11 03:46:54

I suggest reading serialization tutorial.

2019-07-11 08:52:12

This is just some example code to get you started. I'm not sure how your system works but here goes.

if(m.get_item_name(mres)=="playlogo") {
playlogo=(playlogo==1?0:1);
speak("Logo "+(playlogo==1?"on":"off"));
savesettings();
optionsmenu();
}

Ivan M. Soto.
Feel free to check out my work and services.
http://ims-productions.com