- Joined
- Mar 30, 2013
- Messages
- 664
Greetings,
I've made trigger/s on a attack random in the map.
The units spawns and will therefor attack random.
But when i tested it out, all the other units owned by the players also attacked.
Which is not the point, only the spawned should do.
Iv'e made this triggering before, but its over 2 years ago, and i have forgotten it.
So here's the triggers:
I've made trigger/s on a attack random in the map.
The units spawns and will therefor attack random.
But when i tested it out, all the other units owned by the players also attacked.
Which is not the point, only the spawned should do.
Iv'e made this triggering before, but its over 2 years ago, and i have forgotten it.
So here's the triggers:
-
DemonSpawn Regions
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set SpawnRegions2[1] = DemonSpawnMain <gen>
-
Set SpawnRegions2[2] = DemonSpawnMain2 <gen>
-
-
-
Demon Attack
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Set DoingNothingGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 12 (Brown)) or ((Owner of (Matching unit)) Equal to Player 12 (Brown))))
-
Set TempGroup2 = (Units in (Playable map area) matching ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and ((Unit-type of (Matching unit)) Not equal to dummy missile)))
-
Set Unitposition = (Position of (Random unit from TempGroup2))
-
Unit Group - Pick every unit in DoingNothingGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of (Picked unit)) Equal to (Order(<Empty String>))
-
-
Then - Actions
-
Unit - Order (Picked unit) to Attack-Move To Unitposition
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_DoingNothingGroup)
-
Custom script: call DestroyGroup(udg_TempGroup2)
-
Custom script: call RemoveLocation(udg_Unitposition)
-
-
-
Demon Wave
-
Events
-
Time - Every 4.00 seconds of game time
-
-
Conditions
-
Actions
-
Set TempGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 12 (Brown)) or ((Owner of (Matching unit)) Equal to Player 12 (Brown))))
-
Set TempGroup2 = (Units in (Playable map area) matching ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and ((Unit-type of (Matching unit)) Not equal to dummy missile)))
-
Set Unitposition = (Position of (Random unit from TempGroup2))
-
For each (Integer A) from 1 to 2, do (Actions)
-
Loop - Actions
-
Set Spawn_Point2[1] = (Random point in SpawnRegions2[(Random integer number between 1 and 2)])
-
Unit - Create 1 Demon Heakon for Player 12 (Brown) at Spawn_Point2[1] facing Default building facing degrees
-
Unit - Order (Last created unit) to Attack-Move To Unitposition
-
Unit - Create 1 Demon Siliniar for Player 12 (Brown) at Spawn_Point2[1] facing Default building facing degrees
-
Unit - Order (Last created unit) to Attack-Move To Unitposition
-
Custom script: call RemoveLocation (udg_Spawn_Point2[1])
-
Custom script: call RemoveLocation (udg_Spawn_Point2[bj_forLoopAIndex])
-
Wait 0.00 seconds
-
-
-
Custom script: call DestroyGroup(udg_TempGroup)
-
Custom script: call DestroyGroup(udg_TempGroup2)
-
Custom script: call RemoveLocation(udg_Unitposition)
-
-