• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] Income

Status
Not open for further replies.
Level 10
Joined
Jun 20, 2017
Messages
355
How to fix income? Doesn't work or doesn't add any gold!
For example: I have a repeating timer window, which generates gold every 15 seconds, then when a hunter or his teammate kills a farmer which gives 1 gold and increases with killing.
  • Hunters Income2
    • Events
      • Time - Timer_HuntersIncome expires
    • Conditions
    • Actions
      • Player Group - Pick every player in PlayerGroup_Hunters and do (Actions)
        • Loop - Actions
          • Player - Add Integer_HuntersIncome to (Picked player) Current gold
          • -------- Progame --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Integer_GameModes Equal to 1
            • Then - Actions
              • Player Group - Pick every player in PlayerGroup_Hunters and do (Actions)
                • Loop - Actions
                  • Player - Add (Integer_HuntersIncome x 2) to (Picked player) Current gold
            • Else - Actions
  • Incoming Kill Farmer
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Peasant
          • (Unit-type of (Dying unit)) Equal to Peasant [Female]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 10 (Light Blue)
        • Then - Actions
          • Set Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] = (Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] + 1)
          • Set Integers_HuntersIncome[11] = (Integers_HuntersIncome[11] + 1)
          • Set Integers_HuntersIncome[12] = (Integers_HuntersIncome[12] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 11 (Dark Green)
        • Then - Actions
          • Set Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] = (Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] + 1)
          • Set Integers_HuntersIncome[10] = (Integers_HuntersIncome[10] + 1)
          • Set Integers_HuntersIncome[12] = (Integers_HuntersIncome[12] + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 12 (Brown)
        • Then - Actions
          • Set Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] = (Integers_HuntersIncome[(Player number of (Owner of (Killing unit)))] + 1)
          • Set Integers_HuntersIncome[10] = (Integers_HuntersIncome[10] + 1)
          • Set Integers_HuntersIncome[11] = (Integers_HuntersIncome[11] + 1)
        • Else - Actions
  • Hunters Income
    • Events
      • Player - Player 10 (Light Blue) types a chat message containing -i as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -i as An exact match
      • Player - Player 12 (Brown) types a chat message containing -i as An exact match
    • Conditions
    • Actions
      • Game - Display to (Player group((Triggering player))) the text: (You killed |cffffcc00 + ((String(Integers_HuntersIncome[(Player number of (Triggering player))])) + Farmers.))
      • Game - Display to (Player group((Triggering player))) the text: (Your teammate killed |cffffcc00 + ((String(Integers_HuntersIncome[(Player number of (Triggering player))])) + Farmers.))
      • Game - Display to (Player group((Triggering player))) the text: (Which produce |cffffcc00 + ((String(((Integers_HuntersIncome[(Player number of (Triggering player))] x 2) + Integers_HuntersIncome[(Player number of (Triggering player))]))) + gold every 15 seconds.))
 
Last edited:
Status
Not open for further replies.
Top