I'm trying to make a trigger that fires when a player brings 3 OR MORE units into a region. I want the trigger to kill just 3 units and create a unit for the triggering player in the players assigned region. I have everything working except for the 3 "or more" part. The trigger works fine as long as it is ONLY 3 units in the active region.
Here is the trigger:
Unit - Kill (Unit (Number of Living units in Buy marine) from Buy marine)
Is there no way to change 'Number of Living' to a unit type check and then tell it to effect 3 of those type, sorry haven't got the editor open so I can't check for specific commands.
Conditions (Number of Living units in (Any units in Buy Marine owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 3
Surely chaning the == to >= 3?
if i do this, it will kill all the units that enter the region. I want it just to kill only 3 :(
No he's right. In the trigger conditions change it to >= 3.
But in the Pick Each Unit in group loop, see where it says "At Most", change that to 3. It will stop at 3 units.
Unit Group - Pick each unit in (Any units in Buy Marine owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most [b]Any Amount[/b])
Not done much with the editor myself So this is purely speculation based on what prgramming I do know.
Can you not just create a loop set to repeat 3 times with a unit type check so you don't accidently kill anything but marines?
something like:
void libNtve_gf_Repeat(int count)
Repeats an action set a specified number of times.
Found this in the Galaxy / Triggers / Repeat section, this will repeat a kill action 3 times for you, all you need to do is use the bool UnitFilterMatch(unit inUnit, int inPlayer, unitfilter inFilter) filter to make sure it's killing a marine instead of all living units. that SHOULD work.
No he's right. In the trigger conditions change it to >= 3.
But in the Pick Each Unit in group loop, see where it says "At Most", change that to 3. It will stop at 3 units.
Unit Group - Pick each unit in (Any units in Buy Marine owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most [b]Any Amount[/b])
I'm trying to make a trigger that fires when a player brings 3 OR MORE units into a region. I want the trigger to kill just 3 units and create a unit for the triggering player in the players assigned region. I have everything working except for the 3 "or more" part. The trigger works fine as long as it is ONLY 3 units in the active region. Here is the trigger:
So the condition would have to be >= 3 but how can i get the action to kill just 3 units? Or how can i get the trig to pick JUST 3 units?
Thanks, any help is appreciated!
@copperfront: Go
Missed the last part, yeh >= 3.
Unit - Kill (Unit (Number of Living units in Buy marine) from Buy marine)
Is there no way to change 'Number of Living' to a unit type check and then tell it to effect 3 of those type, sorry haven't got the editor open so I can't check for specific commands.
if i do this, it will kill all the units that enter the region. I want it just to kill only 3 :(
@copperfront: Go
No he's right. In the trigger conditions change it to >= 3.
But in the Pick Each Unit in group loop, see where it says "At Most", change that to 3. It will stop at 3 units.
Unit Group - Pick each unit in (Any units in Buy Marine owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most [b]Any Amount[/b])
^ That.
@copperfront: Go
Not done much with the editor myself So this is purely speculation based on what prgramming I do know.
Can you not just create a loop set to repeat 3 times with a unit type check so you don't accidently kill anything but marines?
something like:
void libNtve_gf_Repeat(int count)
Repeats an action set a specified number of times.
Found this in the Galaxy / Triggers / Repeat section, this will repeat a kill action 3 times for you, all you need to do is use the bool UnitFilterMatch(unit inUnit, int inPlayer, unitfilter inFilter) filter to make sure it's killing a marine instead of all living units. that SHOULD work.
Thanks alot guys. Didn't see the "At most any amout" line there, totally missed it!!
I feel dumb... :( thanks again