_Evo Hardcore Multiboard Save_Load System @ Jass HELP!
We need a save_Load system for both the Leaderboard, and multiboard. we want YOU! to make a Jass Script that when player leaves, or victory, or defeat. that nextime they join a map. they would have their scores from leaderboard and a multiboard again, such of our map.
function Trig_Initialisation_FindSavedPlayer takes nothing returns nothing
local player pickedPlayer = GetEnumPlayer()
if GetStoredInteger(udg_Cache,GetPlayerName(pickedPlayer),"Leaderboard") != 0 then
<- Set Leaderboard Value (GetStoredInteger(udg_Cache,GetPlayerName(pickedPlayer),"Leaderboard")) ->
<- Set Multiboard Value (GetStoredInteger(udg_Cache,GetPlayerName(pickedPlayer),"Multiboard")) ->
endif
set pickedPlayer = null
endfunction
function Trig_Initialisation_Actions takes nothing returns nothing
call ForceEnumPlayers(udg_AllPlayers,null)
call ForForce(udg_AllPlayers,function Trig_Initialisation_FindSavedPlayer)
endfunction
function InitTrig_Initialisation takes nothing returns nothing
set gg_trg_Initialisation = CreateTrigger()
call TriggerAddAction(gg_trg_Initialisation,function Trig_Initialisation_Actions)
endfunction
Trigger "Save"
function Trig_Save_EventRegistration takes nothing returns nothing
local player pickedPlayer = GetEnumPlayer()
call TriggerRegisterPlayerEvent(gg_trg_Save,pickedPlayer,EVENT_PLAYER_VICTORY)
call TriggerRegisterPlayerEvent(gg_trg_Save,pickedPlayer,EVENT_PLAYER_DEFEAT)
set pickedPlayer = null
endfunction
function Trig_Save_Actions takes nothing returns nothing
local player triggerPlayer = GetTriggerPlayer()
call StoreInteger(udg_Cache,GetPlayerName(triggerPlayer),"Leaderboard", <- Value in Leaderboard -> )
call StoreInteger(udg_Cache,GetPlayerName(triggerPlayer),"Multiboard", <- Value in Multiboard -> )
set triggerPlayer = null
endfunction
function InitTrig_Save takes nothing returns nothing
set gg_trg_Save = CreateTrigger()
call ForForce(udg_AllPlayers,function Trig_Save_EventRegistration)
call TriggerAddAction(gg_trg_Save,function Trig_Speicher_Save)
endfunction
... There is another kind of saving/loading system implemented in many multiplayer maps of aeon kind...
It allows to save and restore heros, items, integers... That should be enough, should not it?
If it does not work with game caches, I have no idea how it may do, but it works at last...
All that would have to be done is the replacement of a random loading code with the actual player name and the automatical Try to restore a player's statistics at the beginning of a game. Or am I wrong with that?
Exactly, it's flushed after the game ends. What he wants is to "save" the statistics of a game in order to use them in a new one. Example: John has "10-0", game ends. Later in a new game, John starts with "10-0". For anyone who reads this, this is not possible to do unless, like SnaKy said, you use loadstrings...which is ...uh...