Does save and load attributes work with different attributes?
bernardo.chuecos
Member, PRO Posts: 75
Can you save the value of an attribute into a key and then load it into a different attribute? Because I've been trying all night but now I realize maybe it isn't possible.
Comments
Also, does it work between scenes? Like can I save an attribute in one scene and load it in another one?
Why don't you just use a table? If you use a table you can access that data from anything or put it into any variable.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I have a whole series on tables if you've never used them they are very easy to use.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Hi @bernardo.chuecos Save and Load Attribute Behaviours only work on the device, not in GSC on your computer.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
You can save to one and load to another. You are saving to a Key, and loading from that Key. It doesn't matter which attribute the data related to the key is placed in.
Yes, if you are using a self attribute that is one way of passing it between scenes. Using a game attribute is much simpler, though.
A table is only beneficial if you have lots of attributes to save. They are better for easier management, but less efficient. If you have, say, 5 attributes, you're better with attributes. If you have, say, 20, then a table will be easier to manage. I normally stick to attributes. Tables are way overrated.
This is incorrect, both behaviours work fine in creator.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline Hi Ted, surely not - if you quit GSC and open again they won't work.... least, they never used to...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
You hit the reset button to simulate the game being reloaded. Exiting preview entirely is akin to deleting the game.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Sorry for my slowness here but what reset button?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Next to the pause button
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Oh, that one! Forgot it was called the reset button, thanks. Not sure how that works still though if you've saved and loaded attribute behaviours, closed GSC then opened it again - surely reset would do just that - start you at the beginning again...
Either way, I've been wary of Save & Load game attributes for a while, I use Tables now...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
The way to think about it is like this:
So you can't test fully - you can't test saving/loading between updated versions of a game. But you can test enough to confirm that your saves and loads are in fact occurring as intended.
Can't remember which, but a GS staff member confirmed not that long ago that attributes - even quite a few of them - are more efficient than using a table. The big reason to use a table is easier organisation.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I understand now, thanks Ted.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps