- Joined
- Oct 28, 2019
- Messages
- 481
After some study I´ve made myself a road system
I have set a Scout tower dummy to build the Road (cause the small area)
The building time is 1 second, when it finish it create a dummy in the place (to detect any buildings near)
obs: the trigger is working, but building the road is taking so much time, I need other way to build more fast like WC1 style, and sometimes the place of the dummy varies, IDK why is not always in center of the road.
I have set a Scout tower dummy to build the Road (cause the small area)
The building time is 1 second, when it finish it create a dummy in the place (to detect any buildings near)
-
Build Road
-
Events
- Unit - A unit owned by Player 1 (Red) Finishes construction
-
Conditions
- (Unit-type of (Constructed structure)) Equal to Road
-
Actions
- Environment - Change terrain type at (Position of (Constructed structure)) to Dalaran - White Marble using variation -1 in an area of size 1 and shape Square
- Unit - Remove (Constructed structure) from the game
- Unit - Create 1 Road Dummy for Neutral Passive at (Position of (Constructed structure)) facing (Position of (Triggering unit))
-
Events
-
Barracks
-
Events
- Unit - A unit owned by Player 1 (Red) Begins construction
-
Conditions
- (Unit-type of (Constructing structure)) Equal to Barracks
-
Actions
- Custom script: call DestroyGroup(udg_UGroads)
- Set VariableSet PointBuilding = (Position of (Constructing structure))
- Set VariableSet UGroads = (Units within 300.00 of (Position of (Constructing structure)) matching ((Unit-type of (Matching unit)) Equal to Road Dummy).)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between (Position of (Constructing structure)) and (Position of (Random unit from UGroads))) Less than or equal to 300.00
-
Then - Actions
- Else - Actions
- Game - Display to (All players) the text: Build near road sys...
- Wait 0.50 seconds
- Player - Add 160 to Player 1 (Red).Current gold
- Player - Add 60 to Player 1 (Red).Current lumber
- Unit - Kill (Constructing structure)
-
If - Conditions
-
Events
obs: the trigger is working, but building the road is taking so much time, I need other way to build more fast like WC1 style, and sometimes the place of the dummy varies, IDK why is not always in center of the road.