- Joined
- Dec 20, 2010
- Messages
- 48
I've tried the save&load system by Acehart but I've got some problems with the script.I can save it on its original map but when I paste the triggers into my map, there're errors on the custom script.Somebody plz help me
I would like to give +repp to anybody who helped me to solve this problems !
-
SaveLoad Save All Copy
-
Events
- Player - Player 1 (Red) types a chat message containing -save as An exact match
- Player - Player 2 (Blue) types a chat message containing -save as An exact match
- Player - Player 3 (Teal) types a chat message containing -save as An exact match
- Player - Player 4 (Purple) types a chat message containing -save as An exact match
- Conditions
-
Actions
- -------- Prepare the save array with this player's Hero --------
- Set SaveCount = 0
- -------- Player's Gold --------
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = ((Triggering player) Current gold)
- -------- Take all Heroes --------
- Set UnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Number of units in UnitGroup)
-
Unit Group - Pick every unit in UnitGroup and do (Actions)
-
Loop - Actions
- -------- Save the Hero --------
- Set SaveCount = (SaveCount + 1)
- Set TempUnit = (Picked unit)
- Custom script: set udg_Save[udg_SaveCount] = SaveLoad_Unit2Integer( udg_TempUnit )
- -------- Hero Experience --------
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Hero experience of (Picked unit))
- -------- Hero Position X --------
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Integer((X of (Position of (Picked unit)))))
- -------- Hero Position Y --------
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Integer((Y of (Position of (Picked unit)))))
- -------- How many items does he carry --------
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Number of items carried by (Picked unit))
- -------- Add all items --------
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Item carried by (Picked unit) in slot (Integer A)) is owned) Equal to True
-
Then - Actions
- -------- The actual item --------
- Set SaveCount = (SaveCount + 1)
- Set TempItem = (Item carried by (Picked unit) in slot (Integer A))
- Custom script: set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
- -------- The number of charges it has --------
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Charges remaining in (Item carried by (Picked unit) in slot (Integer A)))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Loop - Actions
- -------- Turn values into code --------
- Custom script: set udg_Code = SaveLoad_Encode()
- -------- Show code to player --------
- Quest - Display to (Player group((Triggering player))) the Secret message: Your code:
- Game - Display to (Player group((Triggering player))) for 60.00 seconds the text: Code
-
Events
I would like to give +repp to anybody who helped me to solve this problems !
Last edited: