Editboxes and saving text.

For questions about using Classic.

Post » Tue Nov 23, 2010 12:39 pm

Hey. :mrgreen:
: Is there some way in my game to make a person type in their name and press ok (done with that part. . .) then construct saves it somehow so that when you save the game it will save to (personname) so that different people can have their own saves :?:

Thanks in advance :!: :D
B
2
G
2
Posts: 30
Reputation: 710

Post » Tue Nov 23, 2010 1:12 pm

This is one way. Assuming the player typed his/her name in "EditBox", then when clicked ok you could do this action:
[code:2jvcl2jl]-> System: Save file AppPath & EditBox.Text & ".sav"[/code:2jvcl2jl]

If the player typed "tulamide", then the file will be named "tulamide.sav" and stored in your app's folder. You may choose any extension you like, and you should make sure that the name typed conforms to the rules for file names (e.g. contains no backslash or colon)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests