axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 04 Oct 2015 08:28 PM |
Mkay, I'd like to make a save script similar to the one in this game: http://www.roblox.com/games/190430249/Dreams-of-Greatness-Alpha-WIP
In the game above, if you die- your stats reset and you loose everything (same thing if you combat log)- I'd like to make a game where your Exp raises for every player/ NPC you kill, and you get a large deduction from your stats if you die or combat log (like 5 level deductions). If you went to LVL 0 (or lower)- you'd just stay at 0 until you got one kill.
I'd also like player position to be saved until death aswell- the X,Y,Z coords would be saved much like in Appoc. Rising/ Dreams of Greatness- and you'd spawn in that location providing you didn't die/ combat log.
--- Thanks for reading and helping me out in advance. ---
If you want something to work off of and not do it by scratch:
[[[-----]]]
local ds = game:GetService("DataStoreService"):GetDataStore("Config") game.Players.PlayerAdded:connect(function(p) coroutine.resume(coroutine.create(function() local Config = script.Config:Clone() Config.Parent = p p:WaitForDataReady() local child=Config:GetChildren() for i=1, #child do child[i].Value=ds:GetAsync(p.userId.."-"..child[i].Name) end end)) end) game.Players.PlayerRemoving:connect(function(p) coroutine.resume(coroutine.create(function() local child=p.Config:GetChildren() for i=1, #child do ds:SetAsync(p.userId.."-"..child[i].Name,child[i].Value) end end))
[[[-----]]]
I got this from some dude awhile back, it works with a configuration and values under the Config in the SSS.
He never told me how to change the values through other scripts for players, because we lost contact and I'm not sure which Skype contact he is.
|
|
|
| Report Abuse |
|
|
|
| 04 Oct 2015 08:58 PM |
| for what you need done your going to need a more complex script than that, if not more scripts. |
|
|
| Report Abuse |
|
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 05 Oct 2015 04:59 AM |
| Not really- I just don't know how to go about it if I want it to be saved on this type of data store. |
|
|
| Report Abuse |
|
|
DataZone
|
  |
| Joined: 26 Jan 2014 |
| Total Posts: 1497 |
|
|
| 05 Oct 2015 05:28 AM |
First of all, don't say "Mkay", it's completely unnecessary!
R$1,008 |
|
|
| Report Abuse |
|
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 05 Oct 2015 03:10 PM |
| I'm sorry- I like to type how I talk, while staying as true as I can to proper English (American) grammar. |
|
|
| Report Abuse |
|
|