• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[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
 
  • 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.
Back
Top