• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Acehart Save/Load Help

Status
Not open for further replies.
Level 1
Joined
Jul 28, 2010
Messages
2
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.

  • 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
The trigger for loading it 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)
      • Hero - Set (Picked unit) Hero-level to Save[SaveCount], Hide level-up graphics
  • 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
I believe that the problem is my unit groups, but I don't know how to fix them and I've spent the past 3 hours trying different things and none of them worked.
 
Status
Not open for further replies.
Top