• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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