- Joined
- Mar 24, 2011
- Messages
- 1,082
So I need to save and load abilities in hashtable. I found a few threads about this matter but I somehow can't figure the custom scripts.
For saving
And what shouls I do for loading ?
For saving
-
Skills Copy 2
-
Events
- Unit - A unit Learns a skill
- Conditions
-
Actions
- Set TempInteger = (Player number of (Triggering player))
- Set TempInteger2 = SkillPlInt[TempInteger]
- Custom script: set udg_TempSkill = GetLearnedSkillBJ()
- Custom script: set udg_TempInteger3 = AbilityID(GetLearnedSkillBJ()) //the problem is in this line. It looks like this after numerous changes.
-
For each (Integer Temp_integer) from 1 to TempInteger2, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load TempInteger of Temp_integer from SkillsHash) Equal to TempInteger3
-
Then - Actions
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set SkillPlInt[TempInteger] = (SkillPlInt[TempInteger] + 1)
- Hashtable - Save TempInteger3 as TempInteger of TempInteger2 in SkillsHash
- Game - Display to (All players) the text: (Name of TempSkill)
-
Events