Product Chat / Read/Write to Disk File.

Author
Message
Mortt
8
Years of Service
User Offline
Joined: 16th May 2016
Location:
Posted: 3rd Jun 2016 16:08
It it possible at moment to write to file and read from file in LUA?

I am looking for some way to save level score and overall game score thus creating high score tables.
If I could save the score to disk file then read them; the current score could be added to the previous score etc etc.

Then by doing a logic script the score will transcribe into which level was last played, Kind of thing.
Any ideas on how to achieve this?
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Jun 2016 16:20 Edited at: 3rd Jun 2016 16:20
Yes you can write to your own dat files and read from them.

I have no idea how. But if you post in the script section of the forum you might get some help from the script heads over there

https://forum.game-guru.com/board/2

i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 3rd Jun 2016 16:43
Obviusly not the full solution, but might help:



hth

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Jun 2016 18:16
https://forum.game-guru.com/thread/213751

In the end of the first post, Moshroom gives some scripts for free that write file to disk and read them back. You can use these as an example if you choose.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Jun 2016 20:29
If you are ever wondering what you can do in lua and it's capable of most things is check out the lua reference guide It does help to look in there occasionally.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Mortt
8
Years of Service
User Offline
Joined: 16th May 2016
Location:
Posted: 16th Jun 2016 16:17
Thank you all. Most helpful.
Scripts now working plus have level score save load as well.
Now that this all works my imagination is running wild.
(Custom) Intel i7 3.3 Mhz. 16 GB fast ram. EVGA Nvidia 560 Ti 4GB. Dell US27 2560 x 1440. AOC 24 1920 x 1080. Awesome.
Next G. Card EVGA GeForce GTX 970 Superclocked ACX 2.0 Gaming 4GB GDDR5 PCIe3.0 Graphics Card.
Would Like EVGA NVIDIA GeForce GTX 1080 8GB GDDR5X PCIe3.0 Graphics Card
PM

Login to post a reply

Server time is: 2024-11-25 01:41:52
Your offset time is: 2024-11-25 01:41:52