• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Create Cursed Gold Mine Trigger

Status
Not open for further replies.
Level 19
Joined
Oct 7, 2014
Messages
2,209
Hello Hive! I'm making an altered melee map where when I select a button in the dialog, for example the Burning Legion, it will create the structures for that race. I first created the Undead race structures so that it will have a Hunted Gold Mine, then after that when I tried to test it it created the Cursed Gold Mine(for the Burning Legion) then created another neutral gold mine. Then I tried to make other triggers for it to work but I still failed. :vw_sad: This last trigger well it doesn't change the gold mine. Really need help here guys.


  • Race Selection Pick 2
    • Events
      • Dialog - A dialog button is clicked for Race_Dialog_2
    • Conditions
    • Actions
      • Set Temp_Integer_1 = (Player number of (Triggering player))
      • Set Temp_Location = ((Triggering player) start location)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Race_Dialog_Buttons_2[0]
        • Then - Actions
          • Melee Game - Create Undead starting units for (Triggering player) at Temp_Location (Include Heroes)
          • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Necropolis
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Hall of Terror using The new unit's default life and mana
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Haunted Gold Mine
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                  • Unit Group - Pick every unit in (Units within 1000.00 of ((Picked player) start location)) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Picked unit)) Equal to Gold Mine
                        • Then - Actions
                          • Unit - Create 1 Cursed Gold Mine for (Picked player) at (Position of (Picked unit)) facing Default building facing degrees
                        • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Acolyte
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Cultist using The new unit's default life and mana
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Ghoul
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Imp using The new unit's default life and mana
                • Else - Actions
        • Else - Actions
 
Level 12
Joined
Oct 16, 2010
Messages
680
  • Unit - Remove (Picked unit) from the game
  • Unit Group - Pick every unit in (Units within 1000.00 of ((Picked player) start location)) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Picked unit)) Equal to Gold Mine
        • Then - Actions
          • Unit - Create 1 Cursed Gold Mine for (Picked player) at (Position of (Picked unit)) facing Default building facing degrees
        • Else - Actions
(picked player)start loc should be Temp_location
(picked player) should be (owner of (picked unit))
and u should remove the gold mine before making a new on top of it.

like this
  • Unit Group - Pick every unit in (Units within 1000.00 of Temp_Location and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Picked unit)) Equal to Gold Mine
        • Then - Actions
          • Set Temp_u = (picked unit)
          • Set Temp_Point = position of Temp_u
          • Set Temp_player = owner of Temp_u
          • Unit - Remove Temp_u from the game
          • Unit - Create 1 Cursed Gold Mine for Temp_player at Temp_Point facing Default building facing degrees
        • Else - Actions
EDIT: also this part should be out of the other loop
  • Race Selection Pick 2
    • Events
      • Dialog - A dialog button is clicked for Race_Dialog_2
    • Conditions
    • Actions
      • Set Temp_Integer_1 = (Player number of (Triggering player))
      • Set Temp_Location = ((Triggering player) start location)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Race_Dialog_Buttons_2[0]
        • Then - Actions
          • Melee Game - Create Undead starting units for (Triggering player) at Temp_Location (Include Heroes)
          • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Unit-type of (Picked unit)) Equal to Necropolis
              • Then - Actions
                • Unit - Replace (Picked unit) with a Hall of Terror using The new unit's default life and mana
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Unit-type of (Picked unit)) Equal to Acolyte
              • Then - Actions
                • Unit - Replace (Picked unit) with a Cultist using The new unit's default life and mana
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Unit-type of (Picked unit)) Equal to Ghoul
              • Then - Actions
                • Unit - Replace (Picked unit) with a Imp using The new unit's default life and mana
              • Else - Actions
          • Unit Group - Pick every unit in (Units within 1000.00 of Temp_Location and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Gold Mine
                • Then - Actions
                  • Set Temp_u = (picked unit)
                  • Set Temp_Point = position of Temp_u
                  • Set Temp_player = owner of Temp_u
                  • Unit - Remove Temp_u from the game
                  • Unit - Create 1 Cursed Gold Mine for Temp_player at Temp_Point facing Default building facing degrees
                • Else - Actions
        • Else - Actions
 
Level 19
Joined
Oct 7, 2014
Messages
2,209
The haunted gold mine isn't removed
  • Race Selection Pick 2
    • Events
      • Dialog - A dialog button is clicked for Race_Dialog_2
    • Conditions
    • Actions
      • Set Temp_Integer_1 = (Player number of (Triggering player))
      • Set Temp_Location = ((Triggering player) start location)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Race_Dialog_Buttons_2[0]
        • Then - Actions
          • Melee Game - Create Undead starting units for (Triggering player) at Temp_Location (Include Heroes)
          • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Necropolis
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Hall of Terror using The new unit's default life and mana
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Haunted Gold Mine
                • Then - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Acolyte
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Cultist using The new unit's default life and mana
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Ghoul
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Imp using The new unit's default life and mana
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Haunted Gold Mine
                • Then - Actions
                  • Unit - Remove (Picked unit) from the game
                • Else - Actions
          • Unit Group - Pick every unit in (Units within 2000.00 of Temp_Location) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Gold Mine
                • Then - Actions
                  • Set Temp_u = (Picked unit)
                  • Set Temp_Point = (Position of Temp_u)
                  • Set Temp_player = (Owner of Temp_u)
                  • Unit - Remove Temp_u from the game
                  • Unit - Create 1 Cursed Gold Mine for Temp_player at Temp_Point facing Default building facing degrees
                • Else - Actions
        • Else - Actions
 
Level 12
Joined
Oct 16, 2010
Messages
680
add one more line in the conditions

  • (Unit-type of (Picked unit)) Equal to Gold Mine
  • (Unit-type of (Picked unit)) Equal to Haunted Gold Mine
EDIT: or wait... what?
u just forgot to replace
remove this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Picked unit)) Equal to Haunted Gold Mine
    • Then - Actions
    • Else - Actions
and add the condition as I mentioned
 
Status
Not open for further replies.
Top