SpasMaster
Hosted Project: SC
- Joined
- Jan 29, 2010
- Messages
- 1,993
Hello, guys. I got another weird issue I ran into.
I have this "tower" that shoots all the way at the enemy base, but at a random point. However, it seems to always shoot at the same place. Here is the trigger:
I have this "tower" that shoots all the way at the enemy base, but at a random point. However, it seems to always shoot at the same place. Here is the trigger:
[trigger=""]Artilleries
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Artillery
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player number of (Owner of (Attacking unit))) Less than 5
Then - Actions
Set Artillery_Point = (Random point in East Base <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player number of (Owner of (Attacking unit))) Greater than 5
Then - Actions
Set Artillery_Point = (Random point in West Base <gen>)
Else - Actions
Unit - Order (Attacking unit) to Attack Ground Artillery_Point
Custom script: call RemoveLocation (udg_Artillery_Point)
[/trigger]
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Artillery
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player number of (Owner of (Attacking unit))) Less than 5
Then - Actions
Set Artillery_Point = (Random point in East Base <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player number of (Owner of (Attacking unit))) Greater than 5
Then - Actions
Set Artillery_Point = (Random point in West Base <gen>)
Else - Actions
Unit - Order (Attacking unit) to Attack Ground Artillery_Point
Custom script: call RemoveLocation (udg_Artillery_Point)
[/trigger]