• 🏆 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!

[Trigger] Please help me with trigger 4 +rep credit in map

Status
Not open for further replies.
Level 4
Joined
Feb 9, 2008
Messages
33
hey guys thanks for visiting my post, now i was just wondering if anyone could help me with a problem ive been having with my map.

first of all just so u all know my map is a tag map based on tree tag/island of frogs III but way different and much more exciting by my opinion, now the problem i have is with my income trigger if anyone could help me with finding a trigger or several triggers if not 1 that would do this for me.....

event=unit is constructed

condition=unit type is equal to <Storage House>(tats my income building btw)

action=add X amount of gold to owner of (triggering unit) every X amount of seconds.

if anyone could do that for me or at least help me in the slightest i would be extremely greatful and give u credits on my map in return aswell as rep :), thanks a million guys :infl_thumbs_up:
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
  • Events
    • Time - Every X Seconds
  • Conditions
  • Actions
    • For Each A integer from 1 to Y
      • Loop Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick Every Unit owned by Player(integer A) of type Income Building
          • Loop Actions
            • if Picked Unit is Alive then (Player - Add Z gold to Player(integer A)) else (Do Nothing)
if you'll have more buildings
  • Events
    • Time - Every X Seconds
  • Conditions
  • Actions
    • For Each A integer from 1 to Y
      • Loop Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick Every Unit owned by Player(integer A)
          • Loop Actions
            • if Picked Unit is Alive
              • Then
                • if Unit Type of Picked Unit is Farm1 then (Add Z1 gold to Player(integer A)) else (Do Nothing)
                • if Unit Type of Picked Unit is Farm2 then (Add Z2 gold to Player(integer A)) else (Do Nothing)
                • if Unit Type of Picked Unit is Farm3 then (Add Z3 gold to Player(integer A)) else (Do Nothing)
                • Else
X = interval
Y = max number of players
Z = Gold per building
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I just answerd the exact question 2 days ago :hohum:

Giving money
  • Untitled Trigger 001
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Player - Add Income[(Integer A)] to (Player((Integer A))) Current gold
Initializating money
  • Untitled Trigger 002
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set Income[(Integer A)] = 5
Increasing money
  • Untitled Trigger 003
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructed structure)) Equal to Farm
        • Then - Actions
          • Set Income[(Player number of (Owner of (Constructed structure)))] = (Income[(Player number of (Owner of (Constructed structure)))] + 2)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Constructed structure)) Equal to Altar of Kings
            • Then - Actions
              • Set Income[(Player number of (Owner of (Constructed structure)))] = (Income[(Player number of (Owner of (Constructed structure)))] + 4)
            • Else - Actions
Decreasing money
  • Untitled Trigger 004
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A structure) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructed structure)) Equal to Farm
        • Then - Actions
          • Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] - 2)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Constructed structure)) Equal to Altar of Kings
            • Then - Actions
              • Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] - 4)
            • Else - Actions
 
Status
Not open for further replies.
Top