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

Secret Haunted Goldmine Building?

Level 11
Joined
Mar 1, 2009
Messages
365
I have trigger that picks every haunted goldmine only the haunted goldmines i had my acolyte build is picked

the haunted goldmines that are built through the neutral building instant haunt goldmine trigger at game start not picked it's like there a different unit all together but i cant find them in the world editor.... any one else know shine some light on it?

(i can post the trigger when i get home but still... i pick all haunted goldmines its the ones that instantly built through the Neutral Building Haunt Goldmine trigger that arnt picked cuz their a different unit?)
 
this trigger is referenced when players type "-repick"

  • ReplaceGoldmines
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type dummy (GoldMine)) and do (Actions)
        • Loop - Actions
          • Set VariableSet TempPoint = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units within 200.00 of TempPoint matching (((Unit-type of (Matching unit)) Equal to Haunted Gold Mine) or (((Unit-type of (Matching unit)) Equal to Entangled Gold Mine) or (((Unit-type of (Matching unit)) Equal to Entangled Gold Mine) or Equal to 0
            • Then - Actions
              • Unit - Replace (Picked unit) with a Gold Mine using The old unit's relative life and mana
              • Neutral Building - Add 1000000000 gold to (Last replaced unit)
              • Unit - Create 1 dummy (GoldMine) for Neutral Passive at TempPoint facing Default building facing degrees
            • Else - Actions
              • Do nothing
          • Custom script: call RemoveLocation (udg_TempPoint)

This is trigger adds in starting forces for the scourge


  • button8 scourge Copy
    • Events
      • Dialog - A dialog button is clicked for mydialog
    • Conditions
      • (Clicked dialog button) Equal to button8scouge
    • Actions
      • Unit - Create 1 Command Center (All Players) for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Unit - Create 1 Necropolis for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Unit - Create 1 Ghoul for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Unit - Create 5 Acolyte for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Set VariableSet TempPoint = ((Triggering player) start location)
      • Unit Group - Pick every unit in (Units within 1100.00 of TempPoint matching ((Unit-type of (Matching unit)) Equal to Gold Mine).) and do (Actions)
        • Loop - Actions
          • Unit - Replace (Picked unit) with a Haunted Gold Mine using The old unit's relative life and mana
          • Unit - Change ownership of (Last replaced unit) to (Triggering player) and Change color
          • Neutral Building - Add 1000000000 gold to (Last replaced unit)
      • Player - Set (Triggering player).Current gold to 500
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Game - Display to (All players) for 30.00 seconds the text: (Name of (Triggering player))
      • Game - Display to (All players) for 30.00 seconds the text: HAS CHOSEN SCOURGE!!
THE PROBLEM is when i pick scourge then repick then pick scourge again all of the sudden I get 4 mines? when originally I had 2.... it adds 2 haunted gold mines increasing total number to 4.... and i don't know why... this continues adding 2 gold mines every time i pick repick scourge 3 time I have 6 haunted goldmine...

there is one more trigger that adds the dummy goldmine unit underneath every gold mine to hold that location
 
well instead of just activating the trigger when a player types "-repick" instead i had to create a player group for players that pick scourge

  • Repick Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
    • Conditions
      • ((Elapsed time for Timer) Less than or equal to 120.00) and ((Entered chat string) Equal to -repick)
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player) of type Gold Mine) and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to Neutral Passive and Change color
          • Animation - Reset (Attacked unit)'s animation
          • Unit - Remove Commune (old gods) from (Attacked unit)
      • Unit Group - Pick every unit in (Units owned by (Triggering player).) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in PlayerGroupUndead.) Equal to False
        • Then - Actions
          • Trigger - Run ReplaceGoldmines <gen> (checking conditions)
        • Else - Actions
          • Player Group - Remove (Triggering player) from PlayerGroupUndead.
Now the repick trigger will only activate for players who don't go scourge
The Trigger's not the porblem there must be some bs hardcode for undead..... this trigger above gets around it
 
Back
Top