Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: MrMitch on July 02, 2012, 05:13:45 PM
-
I can't seem to find anything that allows me to enter some text to save along side a time.
I've searched through the actions and couldn't figure out how to do it.
Any advice?
-
Not sure what you mean, but if you're saving the game then you're most likely using PlayerPrefs, right?
If so, then you can call up a GUILayout TextField and have the player enter a string in that, then use the string to preface whatever playerPref keys you end up storing for the savegame.
-
Thanks, i've no idea how i missed that :S
Feels almost pointless starting this thread, if someone with the power feels it shouldn't exist feel free to remove it :P
-
Just edit the subject to include the [SOLVED] declaration.
Good luck!
-
Rather than create a whole new thread i thought i would just put this question here.
Using Text Field how do i store the text entered by the player in a string variable?
-
Hi,
you will need to use the playerPrefsSetString. you choose a "key" to reference that string when you will want to get it back using PLayerPrefsGEtInt.
There is a working example ( storing ints, but this is the same principle), in the M2H game sample ported to playmaker.
https://hutonggames.fogbugz.com/default.asp?W880 (https://hutonggames.fogbugz.com/default.asp?W880)
in particular the jump game. It stores the high score using the player prefs:
https://hutonggames.fogbugz.com/default.asp?W895 (https://hutonggames.fogbugz.com/default.asp?W895)
So download and study this game and that particular features.
There is also playerprefs implement using string in the Photon beta demo, where the user can save his username, and I store and retrieve it in between sessions. So you can check that out as well if you want to go further.
Bye,
Jean
-
Thanks Jean managed to get it working :)