Lmfaocj
Active Member
- Reaction score
- 1
The AceHart Load abilities won't load for some reason... I think I know what it is but don't know how to fix it.
It something to do with the If i am not mistaken.
Trigger:
- SaveLoad Load All
- Events
- Player - Player 1 (Red) types a chat message containing -load as A substring
- Player - Player 2 (Blue) types a chat message containing -load as A substring
- Player - Player 3 (Teal) types a chat message containing -load as A substring
- Player - Player 4 (Purple) types a chat message containing -load as A substring
- Conditions
- (Substring((Entered chat string), 1, 6)) Equal to (==) (Matched chat string)
- (Length of (Entered chat string)) Greater than (>) 6
- Actions
- -------- Try to decode what was typed --------
- Set Code = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
- Custom script: set udg_Validate = SaveLoad_Decode( udg_Code )
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Validate Equal to (==) False
- Then - Actions
- -------- Invalid code --------
- Game - Display to (Player group((Triggering player))) the text: There's some error ...
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- -------- It worked, let's do something with it --------
- Set AATempInteger = SaveCount
- Set SaveCount = 1
- For each (Integer SaveCount) from (SaveCount + 1) to AATempInteger, do (Actions)
- Loop - Actions
- For each (Integer A) from 1 to Save[(SaveCount + 1)], do (Actions)
- Loop - Actions
- Custom script: call SelectHeroSkill( GetLastCreatedUnit(), udg_SaveLoad_Abilities[ udg_Save[ udg_SaveCount ] ] )
- Loop - Actions
- Set SaveCount = (SaveCount + 1)
- For each (Integer A) from 1 to Save[(SaveCount + 1)], do (Actions)
- Loop - Actions
- Events
It something to do with the
Trigger:
- Set AATempInteger = SaveCount
This is the full code
Trigger:
- SaveLoad Load All
- Events
- Player - Player 1 (Red) types a chat message containing -load as A substring
- Player - Player 2 (Blue) types a chat message containing -load as A substring
- Player - Player 3 (Teal) types a chat message containing -load as A substring
- Player - Player 4 (Purple) types a chat message containing -load as A substring
- Conditions
- (Substring((Entered chat string), 1, 6)) Equal to (==) (Matched chat string)
- (Length of (Entered chat string)) Greater than (>) 6
- Actions
- -------- Try to decode what was typed --------
- Set Code = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
- Custom script: set udg_Validate = SaveLoad_Decode( udg_Code )
- Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Validate Equal to (==) False
- Then - Actions
- -------- Invalid code --------
- Game - Display to (Player group((Triggering player))) the text: There's some error ...
- Skip remaining actions
- Else - Actions
- If - Conditions
- Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- -------- It worked, let's do something with it --------
- Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Loop - Actions
- Set AATempInteger = SaveCount
- Set SaveCount = 1
- -------- Restore Gold --------
- Player - Set (Triggering player) Current gold to Save[SaveCount]
- -------- Restore Lumber --------
- Set SaveCount = (SaveCount + 1)
- Player - Set (Triggering player) Current lumber to Save[SaveCount]
- -------- Rebirths --------
- Set SaveCount = (SaveCount + 1)
- Set RebirthCount[(Player number of (Triggering player))] = Save[SaveCount]
- -------- Restore Hero --------
- Set SaveCount = (SaveCount + 1)
- Custom script: set udg_TempUnitType = SaveLoad_Integer2Unit(udg_Save[udg_SaveCount])
- Unit - Create 1 TempUnitType for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees
- Set Yourunit[(Player number of (Triggering player))] = (Last created unit)
- -------- Set Experience --------
- Set SaveCount = (SaveCount + 1)
- Hero - Set Yourunit[(Player number of (Triggering player))] experience to Save[SaveCount], Hide level-up graphics
- -------- Move to saved position --------
- Set SaveCount = (SaveCount + 1)
- Unit - Move Yourunit[(Player number of (Triggering player))] instantly to (Point((Real(Save[SaveCount])), (Real(Save[(SaveCount + 1)]))))
- Set SaveCount = (SaveCount + 1)
- -------- Recreate all items --------
- Set SaveCount = (SaveCount + 1)
- Do Multiple ActionsFor each (Integer A) from 1 to Save[SaveCount], do (Actions)
- Loop - Actions
- -------- The actual item --------
- Set SaveCount = (SaveCount + 1)
- Custom script: set udg_TempItemType = SaveLoad_Integer2Item(udg_Save[udg_SaveCount])
- Hero - Create TempItemType and give it to Yourunit[(Player number of (Triggering player))]
- -------- Number of charges --------
- Set SaveCount = (SaveCount + 1)
- Item - Set charges remaining in (Last created item) to Save[SaveCount]
- Loop - Actions
- Do Multiple ActionsFor each (Integer SaveCount) from (SaveCount + 1) to AATempInteger, do (Actions)
- Loop - Actions
- Do Multiple ActionsFor each (Integer A) from 1 to Save[(SaveCount + 1)], do (Actions)
- Loop - Actions
- Custom script: call SelectHeroSkill( GetLastCreatedUnit(), udg_SaveLoad_Abilities[ udg_Save[ udg_SaveCount ] ] )
- Loop - Actions
- Set SaveCount = (SaveCount + 1)
- Do Multiple ActionsFor each (Integer A) from 1 to Save[(SaveCount + 1)], do (Actions)
- Loop - Actions
- Do Multiple ActionsFor each (Integer A) from 1 to Save[SaveCount], do (Actions)
- Hero - Modify unspent skill points of (Triggering unit): Set to 0 points
- If ((Noob Start <gen> is on) Equal to (==) True) then do (Trigger - Run Noob Start <gen> (checking conditions)) else do (Do nothing)
- Do ActionFor each (Integer A) from 1 to SaveLoad_Heroes_LastIndex, do (Player - Make Heros[(Integer A)] Available for training/construction by (Triggering player))
- Events