I am trying to edit Achart's save/load code so that it will save a proficiency my rpg. I have it so that there is a region that contains two units, a hero for the proficiency level and a unit for the proficiency.
The trigger to save the proficiency is this.
The trigger to save the proficiency is this.
-
Unit Group - Pick every unit in (Units in ProfRegion[(Player number of (Triggering player))] matching ((Unit-type of (Matching unit)) Equal to Prof Level)) and do (Actions)
-
Loop - Actions
- Set SaveCount = (SaveCount + 1)
- Set Save[SaveCount] = (Hero level of (Picked unit))
-
Unit Group - Pick every unit in (Units in ProfRegion[(Player number of (Triggering player))] matching ((Unit-type of (Matching unit)) Not equal to Prof Level)) and do (Actions)
-
Loop - Actions
- Set SaveCount = (SaveCount + 1)
- Set ProfUnitNumber = 21
- Set Save[SaveCount] = ProfUnitNumber
-
Loop - Actions
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in ProfRegion[(Player number of (Triggering player))] matching ((Unit-type of (Matching unit)) Equal to Prof Level)) and do (Actions)
-
Loop - Actions
- Set SaveCount = (SaveCount + 1)
- Hero - Set (Picked unit) Hero-level to Save[SaveCount], Hide level-up graphics
-
Loop - Actions
- Set SaveCount = (SaveCount + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Save[SaveCount] Equal to 21
-
Then - Actions
- Unit - Create 1 Fishing for Player 12 (Brown) at (Center of ProfRegion[(Player number of (Triggering player))]) facing Default building facing degrees
- Else - Actions
-
If - Conditions