• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Increasing Gold Harvesting

Status
Not open for further replies.
Well, I want my Acolytes gather 20 gold instead of 10 from the gold mine. Here is what I tried but it seems it doesn't work.

  • Gold Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Gather (Acolyte Gold)
    • Actions
      • Set GOLD_INDEX = (GOLD_INDEX + 1)
      • -------- --------
      • Set GOLD_CASTER[GOLD_INDEX] = (Triggering unit)
      • Set GOLD_OWNER[GOLD_INDEX] = (Triggering player)
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GOLD_INDEX Equal to 1
        • Then - Actions
          • Trigger - Turn on Gold Loop <gen>
        • Else - Actions
  • Gold Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- --------
      • -------- This trigger must be intially off --------
      • -------- --------
      • For each (Integer GOLD_LOOP) from 1 to GOLD_INDEX, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GOLD_OWNER[GOLD_LOOP] Equal to Player 1 (Red)
            • Then - Actions
              • Player - Add 10 to GOLD_OWNER[GOLD_LOOP] Current gold
            • Else - Actions
          • -------- --------
          • -------- Recycling --------
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of GOLD_CASTER[GOLD_LOOP]) Not equal to (Order(harvest))
            • Then - Actions
              • Set GOLD_CASTER[GOLD_INDEX] = GOLD_CASTER[GOLD_LOOP]
              • Set GOLD_OWNER[GOLD_INDEX] = GOLD_OWNER[GOLD_LOOP]
              • Set GOLD_INDEX = (GOLD_INDEX - 1)
              • Set GOLD_LOOP = (GOLD_LOOP - 1)
              • -------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GOLD_INDEX Equal to 0
                • Then - Actions
                  • -------- Debug msg --------
                  • Game - Display to (All players) the text: SPELL HAS ENDED
                  • -------- --------
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
There must be some problem with it but I could not find any. So, anyone knows?
 
Status
Not open for further replies.
Top