Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
MuFake

Read/Write From .txt file

Question

Hey, Im trying to achieve a player save / load for my game, and thought that I may use a .txt file to store the information.... 
What I am trying to achieve is extract information (int variable) from the .txt file...

(From .txt) PlayerLevel = 100    into    (JavaScript) var PlayerLevel : int;

How can Achieve this? Any help will be appreciated :)

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Here is the save load script I wrote for Delirious Devon. This is not meant to be dragged into your project, it's just for you to see how it's done, that's it.

 

Please login or register to see this code.

Scenedata strings are just lists of 0's and 1's that are represented as booleans. 1 representing has not been picked up in the scene, 0 representing that it has been.

 

 

 

And this is what the save file looks like:

Please login or register to see this code.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...