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) ?
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) ?