So I am having problems with a trigger. My goal is this,
When at least 4 units enter the region Battlecriusers, 3 battlecruisers will spawn at a the players spawn point.
This part works.
Now, after the 3 battlecruisers are made, I want the 4 units to die. But only for, because it may be the case that there are more than 4 units in the triggering area.
This is what I am using for code, anyone see any problems with it, or know how to do what I described with a different way?
I do see another possible problem though. The trigger will run each time a unit enters the region. Say you have 5 marines running to the region. The trigger will run 5 times. The first 3 will be skipped since there are only 1, 2, 3 units in the region. However, marine 4 and 5 will both trigger the... uuh, trigger. Since you are waiting 1 second before you remove any units, the trigger will successfully run twice, and give you 3+3 battlecruisers even though you only had 5 marines. Remove the wait 1 second.
Ah, I think i figured out how your Unit - Remove looks. Your problem is that you are removing unit number 4 from the unit group. the number after unit in unit group is the index that identifies each unit. So you are just removing a single unit that happens to have index 4.
So I am having problems with a trigger. My goal is this,
When at least 4 units enter the region Battlecriusers, 3 battlecruisers will spawn at a the players spawn point.
This part works.
Now, after the 3 battlecruisers are made, I want the 4 units to die. But only for, because it may be the case that there are more than 4 units in the triggering area.
This is what I am using for code, anyone see any problems with it, or know how to do what I described with a different way?
I'm having a hard time figuring out how exactly the Unit - Remove looks in the expanded "tree view"... but can't you just do something like this: ?
I do see another possible problem though. The trigger will run each time a unit enters the region. Say you have 5 marines running to the region. The trigger will run 5 times. The first 3 will be skipped since there are only 1, 2, 3 units in the region. However, marine 4 and 5 will both trigger the... uuh, trigger. Since you are waiting 1 second before you remove any units, the trigger will successfully run twice, and give you 3+3 battlecruisers even though you only had 5 marines. Remove the wait 1 second.
Ah, I think i figured out how your Unit - Remove looks. Your problem is that you are removing unit number 4 from the unit group. the number after unit in unit group is the index that identifies each unit. So you are just removing a single unit that happens to have index 4.