Global variable and storage!

Hello everyone! I am making a game in which I have to read value from storage(like no of coins) and save it! I want it to be a global variable in my game!
AND now to the feature! So there is already a way to read value and save it and save it as scene variable and then manually making global variable equal to the scene variable!
BUT I think there should be a way to directly read a value and save it as global variable! In my opinion it will save time and make developing a bit easier! (Btw if I am not mistaken it is the case! Correct me if I am wrong)
Btw many small changes can make a big difference! :slight_smile:

well it doesnt seem to me a big problem but if people think it is usefull :thinking:

1 Like

But for me it is a huge problem cause I have to save more than 10 variable in my game (coins gems highscore powerups guns skins etc) ! And to add scene variable and doing those steps is too much time consuming!

I have a bunch of global variables in my game too, and some of them have to be read from scene variables just for saving. It would be nice to write or read directly from a global variable instead of having to pass the values back and forth, if I’m understanding what you mean correctly.

I don’t know if it would be a “small” change on the engine-side. I’m not very fluent with JavaScript yet, but I know that programming just about anything is time consuming, even for seasoned professionals. Might as well get used to it if you plan on continuing to develop games lol

1 Like

There is an event in GD called read value and save it as a scene variable! I just want it should also have read and save as a “global variable”!
I cant code so I am asking for help!

Yes, I’m aware of the event, that’s what I said above.

If you reread what I said, I agreed it would be useful… :face_with_raised_eyebrow:

I’d try to help with coding if I knew more.

1 Like

Create an new action, that is possible to made with two other actions is not very useful.
If for you this conversion takes up space in your event sheet you can always do a function that converts it into a global variable.

1 Like

Having to create scene variables that have no purpose other than to pass data into a global variable so that it can be saved is redundant and not very efficient, even with using functions. You still need multiple scene variables to write the data into global variables, and back again. It’s time consuming. Anything that would save someone valuable time in the long run is highly useful.

1 Like

Yeah exactly What I was trying to tell ! But Plz anyone help add it! I wish I could but I Don’t know coding!
Thanks for understanding