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

Gold saving stuff

Status
Not open for further replies.
Level 3
Joined
May 24, 2008
Messages
53
Hi everyone
How can I do the following:
I have 3 regions called BANK01, BANK02 and BANK03...
I need to turn on SAVEGOLD and LOADGOLD triggers when a unit enters any of those banks..
I need to turn on the triggers only for the player with a unit in one of the tree regions..
and then disable them, when that player's unit leaves...
there's up to 12 players in the map and 1 unit(hero) per player..
the regions are accessible for all the unit if necessary..

can anyone help me to do that?
thanks!
progress.gif
http://www.thehelper.net/forums/editpost.php?do=editpost&p=1175107
 
Put every HERO in a variable with array 12, do the same with BANK regions.
Then your trigger should look something like this:
  • Save
    • Events
      • Player - Player 1 (Red) types a chat message containing SAVE GOLD as An exact match
      • Player - Player 2 (Blue) types a chat message containing SAVE GOLD as An exact match
      • Player - Player 3 (Teal) types a chat message containing SAVE GOLD as An exact match
      • Player - Player 4 (Purple) types a chat message containing SAVE GOLD as An exact match
      • Player - Player 5 (Yellow) types a chat message containing SAVE GOLD as An exact match
      • Player - Player 6 (Orange) types a chat message containing SAVE GOLD as An exact match
      • Player - .......
    • Conditions
    • Actions
      • For each (Integer B) from 1 to 3, do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to 12, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BANK[(Integer B)] contains HERO[(Integer A)]) Equal to True
                • Then - Actions
                  • -------- All you action here --------
                  • -------- --------------------- --------
                • Else - Actions
 
Status
Not open for further replies.
Back
Top