- Joined
- Dec 31, 2016
- Messages
- 320
I have this trigger to generate trees in order in a region.
But when I run the map the trees are generated like this. Altough, it shows me that the distance between 1. and 2. row is the same as between 2. and 3. row, so I don't understand how it is possible.
WC3ScrnShot_071617_192656_01.tga
-
Untitled Trigger 001
-
Events
-
Conditions
-
Actions
-
Set Random_point_tree = (Center of (Playable map area))
-
Set Random_point_tree_2 = (Random_point_tree offset by (((Real((Random integer number between -5 and 5))) x 200.00), ((Real((Random integer number between -5 and 5))) x 200.00)))
-
Set Region_tree = (Region(Random_point_tree, Random_point_tree_2))
-
Game - Display to (All players) for 999.00 seconds the text: (Width: + (String((Width of Region_tree))))
-
Game - Display to (All players) for 999.00 seconds the text: (Height: + (String((Height of Region_tree))))
-
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Region_tree
-
For each (Integer A) from 1 to ((((Integer((Width of Region_tree))) / 200) + 1) x (((Integer((Height of Region_tree))) / 200) + 1)), do (Actions)
-
Loop - Actions
-
Game - Display to (All players) for 999.00 seconds the text: (X_minus: + (String(X_minus)))
-
Set Specific_point = (Point(((Max X of Region_tree) - X_minus), ((Max Y of Region_tree) - Y_minus)))
-
Set debug_points[(Integer A)] = Specific_point
-
Destructible - Create a Summer Tree Wall at Specific_point facing (Random angle) with scale 1.00 and variation (Random integer number between 0 and 9)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
X_minus Not equal to (Width of Region_tree)
-
-
Then - Actions
-
Set X_minus = (X_minus + 200.00)
-
-
Else - Actions
-
Set X_minus = 0.00
-
Set Y_minus = (Y_minus + 200.00)
-
Game - Display to (All players) for 999.00 seconds the text: (Y_minus: + (String(Y_minus)))
-
-
-
-
-
Custom script: call RemoveLocation (udg_Random_point_tree)
-
Custom script: call RemoveLocation (udg_Random_point_tree_2)
-
-
WC3ScrnShot_071617_192656_01.tga