This trigger's supposed to make a large number of reapers perform there cluster bomb ability at the same time, when just one unit set up as a 'leader' uses the ability. For whatever reason, though, only the lead reaper actually performs the order. Here's the trigger, copy-pasted directly from the editor. I can't find anything wrong with it, maybe some of you can.
Cluster Bomb
Events
Unit - Any Unit is issued an order to Reaper - G-4 Cluster Bombs
Local Variables
target = (Target point for (Triggering order)) <Point>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == 1
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Triggering unit) == MarineLeader[1][1]
Then
Unit - Order all units in ReaperSquad[1][1] to (Reaper - G-4 Cluster Bombs targeting relative points near target) (Replace Existing Orders)
Else
All the data related stuff is already set up, so that's not the problem.
Check your trigger that adds units to your ReaperSquad. You'll probably find that it's only adding the leader.
I checked that, and that's not the problem. All of the units are correctly in the unit group. I'm thinking it has something to do with the way the targeting works on that ability, but I'm not sure. I'll attach a map so people can see the problem. The problem trigger is in the "Reaper Squad" triggers folder, called 'Clusterbomb'
Just update your references and it works perfectly.
Btw you are doing this if statement using an if statement for every single player index. It would be much easier and more efficient to just do ReaperLeader[1][Owner of (Triggering Unit)] (do the same thing with 2 and 3).
Wow, I feel pretty stupid about that. Something so simple and obvious, and yet I feel like that if you hadn't pointed it out I would of never noticed. Thanks, lol, it works now.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This trigger's supposed to make a large number of reapers perform there cluster bomb ability at the same time, when just one unit set up as a 'leader' uses the ability. For whatever reason, though, only the lead reaper actually performs the order. Here's the trigger, copy-pasted directly from the editor. I can't find anything wrong with it, maybe some of you can.
Cluster Bomb
Events
Unit - Any Unit is issued an order to Reaper - G-4 Cluster Bombs
Local Variables
target = (Target point for (Triggering order)) <Point>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If (Owner of (Triggering unit)) == 1
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Triggering unit) == MarineLeader[1][1]
Then
Unit - Order all units in ReaperSquad[1][1] to (Reaper - G-4 Cluster Bombs targeting relative points near target) (Replace Existing Orders)
Else
All the data related stuff is already set up, so that's not the problem.
Check your trigger that adds units to your ReaperSquad. You'll probably find that it's only adding the leader.
I checked that, and that's not the problem. All of the units are correctly in the unit group. I'm thinking it has something to do with the way the targeting works on that ability, but I'm not sure. I'll attach a map so people can see the problem. The problem trigger is in the "Reaper Squad" triggers folder, called 'Clusterbomb'
@Doomsaloto: Go
Found the problem. You are checking:
It should be:
Just update your references and it works perfectly.
Btw you are doing this if statement using an if statement for every single player index. It would be much easier and more efficient to just do ReaperLeader[1][Owner of (Triggering Unit)] (do the same thing with 2 and 3).
@Abion47: Go
Wow, I feel pretty stupid about that. Something so simple and obvious, and yet I feel like that if you hadn't pointed it out I would of never noticed. Thanks, lol, it works now.