• 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] Main building closer to gold mine

Status
Not open for further replies.
Level 1
Joined
May 14, 2015
Messages
5
Hello Guys. I have one problem with my map.
I'm creating four new races.
I removed base tigger part which creating startning units for all players and I made for each player tigger with creating new starting units based on race.

I have problem with one tigger. I want to create my main building (something like tree of life) closer to the nearest gold mine but i don't know how to do it...

Now my tigger looking like that:
---------------------------------
Events:
*Map initialization

Conditions:
*(Race of Player 1 (Red)) equals Night Elves
*(Player 1 (Red) controller) eqials User

Actions:
*Unit - Create 1 Tree of Corruption for Player 1 (Red) at (Player 1 (Red) start location facing default building orientation
*Set Hall = (Last created unit)
*Unit Group - Pick every unit in (Units owned by Neutral - passive matching (((Unit-type of (Matching unit)) equals Gold Mine) and ((Distance between (Position of Hall) and (Position of (Matching unit))) less than or equal 1000.00))) and do (Actions)
--Loop - Actions --
+ Set GoldMine = (Picked unit)
*Set Distance1 = (Distance between (Position of Hall) and (Position of GoldMine))
*Unit - Create 5 Dark Wisp for Player 1 (Red) at ((Player 1 (Red) start location) offset by (Distance1 / 2.00) towards Distance1 degrees) facing default building orientation
*Unit - Order Town Hall to Night Elf - Tree of Life: Entangling (instant) GoldMine
--------------------------

What I need to change to build my building example 100 units closer to nearest gold mine (variable GoldMine) ?
 
Level 1
Joined
May 14, 2015
Messages
5
oO thanks :) but i think this program making town hall as close as it possible to gold mine, i need to make my town hall just a little closer to gold mine.
 
Status
Not open for further replies.
Top