• 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.

[Trigger] Noob needs help with GUI

Status
Not open for further replies.
Level 6
Joined
Mar 5, 2010
Messages
149
So, it was 2 years since I made my last map. I remember pretty much nothing about how to do.

What I need to get done is pretty much this: First select all buildings of 4 different types, then give gold equal to the current mana of the building to the owner

Complete script would is preferred, but anything that helps me do this is appreciated
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
  • Gold
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Unit_Group = (Units owned by Player 1 (Red) of type Town Hall)
      • Unit Group - Pick every unit in Temp_Unit_Group and do (Actions)
        • Loop - Actions
          • Player - Add (Integer((Mana of (Picked unit)))) to Player 1 (Red) Current gold
      • Custom script: call DestroyGroup (udg_Temp_Unit_Group)
      • Set Temp_Unit_Group = (Units owned by Player 1 (Red) of type Barracks)
      • Unit Group - Pick every unit in Temp_Unit_Group and do (Actions)
        • Loop - Actions
          • Player - Add (Integer((Mana of (Picked unit)))) to Player 1 (Red) Current gold
      • Custom script: call DestroyGroup (udg_Temp_Unit_Group)
      • Set Temp_Unit_Group = (Units owned by Player 1 (Red) of type Blacksmith)
      • Unit Group - Pick every unit in Temp_Unit_Group and do (Actions)
        • Loop - Actions
          • Player - Add (Integer((Mana of (Picked unit)))) to Player 1 (Red) Current gold
      • Custom script: call DestroyGroup (udg_Temp_Unit_Group)
      • Set Temp_Unit_Group = (Units owned by Player 1 (Red) of type Arcane Sanctum)
      • Unit Group - Pick every unit in Temp_Unit_Group and do (Actions)
        • Loop - Actions
          • Player - Add (Integer((Mana of (Picked unit)))) to Player 1 (Red) Current gold
      • Custom script: call DestroyGroup (udg_Temp_Unit_Group)
 
Status
Not open for further replies.
Top