Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: createasaurus on October 16, 2015, 05:02:12 PM
-
I have Ints that are either 0 or 1 that I'd like to convert to Bools. Is this possible? Is there a custom action already made for this?
The reason I am doing this is I have Global Bools that I want to save to Player Prefs. However, there is no Playmaker action to save Bools to Player Prefs that I know of. So, I'm manually converting all the Bools to Ints then saving to Player Prefs. Now, for loading, I'm taking these new Player Prefs Ints, and I need to assign them back to Bools. I guess I could write a long thing out using Int Switch for each one... I just was wondering if there was a more elegant way. Thanks!
-
There is a Playerprefs Get/Set Bool in the ecosystem that does this
-
There is a Playerprefs Get/Set Bool in the ecosystem that does this
I know this sounds crazy, but I can't find it.
Please see my attached image of what my Playerprefs menu looks like... no Get/Set Bool. I wonder why I do not have this option? Please, where do I find or get this? If I could simply do Get/Set Bool in Playerprefs, it would solve my whole problem.
In the meantime, I'm starting to write a manual workaround using states to change all Bools to Ints, one by one, then Save, then the reverse for Load. (It is cumbersome, and I worry I can introduce error by writing all this out and overlooking something, but I need to do this somehow.) Furthermore, changing each Int back into a Bool is requiring me to write an Int Switch sending to either a Set to 0 or Set to 1 state... this was the reason for my original post, a request for an Int to Bool action.
Thank you for your thoughts!!
-
Hi,
You are not using ecosystem. Get the ecosystem pckage from here / wiki and install package into your game. Ecosystem is now in the add-on section in the playmaker menu. You are not looking in the right place.
Also you can use playerprefsx
-
@terri & dudebxl
Ah ha! Now I understand. This is the first I have heard of ecosystem. Fantastic!! Thank you.