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

Spawning an Undead Gold Mine on a Gold Mine

Status
Not open for further replies.
Level 3
Joined
Feb 25, 2013
Messages
16
Hey there!

I'm making this map, and it has a Race Pick system (Quite simple, but it works.) and I've deleted most of the standard Map Init. triggers. One disadvantage of this is, that when I spawn the Undead Necropolis and the acolytes + ghoul, it doesn't spawn a Gold Mine for the Undead.

Is there a simple way (With the GUI ONLY), that you can tell it to spawn an Undead Gold Mine on top of the nearest Gold Mine, which is close to the Triggering Player's spawn location.

Hope you can help me :ogre_haosis:

Thanks on forehand
- Stormman67
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
This is made of 2 parts.
First you find the closest gold mine, then replace it with a blighted one.

EDIT: Instead of a long and hard to understand explanation I'll just show a sample trigger.

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempGroup = (Units of type Gold Mine)
      • Set TempReal = 0.00
      • Set TempPointA = (Player 1 (Red) start location)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempPointB = (Position of (Picked unit))
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Distance between TempPointA and TempPointB) Less than (<) TempReal
              • Then - Actions
                • Set TempReal = (Distance between TempPointA and TempPointB)
                • Set TempUnit = (Picked unit)
              • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPointB)
      • Unit - Replace TempUnit with a Haunted Gold Mine using The old unit's relative life and mana
      • Unit - Change ownership of (Last replaced unit) to Player 1 (Red) and Change color
 
Status
Not open for further replies.
Top