The ALLOW and DENY messages show, but canceling doesn't work. The triggers check if the building is being build on Grass Trim, if it is not being build on Grass Trim, the building should cancel. Test map below.
-
Only Build On Trim Grass
-
Events
-
Unit - A unit Begins construction
-
-
Conditions
-
Actions
-
Set Fence_Unit = (Constructing structure)
-
Set Fence_TempPoint[0] = (Position of Fence_Unit)
-
Set Fence_TempPoint[1] = (Fence_TempPoint[0] offset by 45.26 towards 45.00 degrees)
-
Set Fence_TempPoint[2] = (Fence_TempPoint[0] offset by 45.26 towards 135.00 degrees)
-
Set Fence_TempPoint[3] = (Fence_TempPoint[0] offset by 45.26 towards 225.00 degrees)
-
Set Fence_TempPoint[4] = (Fence_TempPoint[0] offset by 45.26 towards 315.00 degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain type at Fence_TempPoint[1]) Equal to Cityscape - Grass Trim
-
(Terrain type at Fence_TempPoint[2]) Equal to Cityscape - Grass Trim
-
(Terrain type at Fence_TempPoint[3]) Equal to Cityscape - Grass Trim
-
(Terrain type at Fence_TempPoint[4]) Equal to Cityscape - Grass Trim
-
-
Then - Actions
-
Game - Display to (All players) for 0.00 seconds the text: ALLOW
-
-
Else - Actions
-
Custom script: call IssueImmediateOrderById (udg_Fence_Unit, 851976)
-
Game - Display to (All players) for 0.00 seconds the text: DENY
-
-
-
Custom script: call RemoveLocation (udg_Fence_TempPoint[0])
-
Custom script: call RemoveLocation (udg_Fence_TempPoint[1])
-
Custom script: call RemoveLocation (udg_Fence_TempPoint[2])
-
Custom script: call RemoveLocation (udg_Fence_TempPoint[3])
-
Custom script: call RemoveLocation (udg_Fence_TempPoint[4])
-
-