• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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