Hi Guys,
I need help for a trigger... once again. I am unable to create this condition to fire the trigger:
Fire trigger when no unit is in the vicinity of that unit type.
Well, I want that trigger to run when there is no unit, which can be any unit, nearby to a specific unit type. not only one unit, but one type. Do I have to make this via unit groups? But then, does this one particular unit from this unit type respond to that trigger, even if other units of the group do not match the condition (=units are nearby)?
I am too stupid to figure that out by my own... :/
You can try making a region, then have a periodic event: every 1 second, move that region to your unit. Then check for conditions within that region. If there's no unit of certain type within that region, fire off your trigger.
Create a region around the unit. Update that region if your unit moves. Make trigger with periodic event. Check number of units in region, and if it's greater than 1, fire your actions.
@TacoManStan: I do not know why you think this is a troll post... I'm just beginning to work with triggers and was too tired to be able to explain my problem carefully.
@sandround, hunterx3: Your solution would mean extremely much work, as I got 80 units that need to be checked. And I guess one region for the whole unittype would not do the trick.
Isn't there some condition I can use to simply check if units are in range 3.0 (actual number does not matter atm) to any supply depot (as an example).
Hmm, you could try making a new ability to give to your unit and set the ability autocast condition. In this case, put a tag on your supply depot to be 'hover' (as example). Then the ability autocasts when a 'hover' unit is in range.
Now under triggers, whenever the ability is executed, do your thing... that's one way to check if a unit comes into range of another.
(if than else) condition -> number of unit in unitgroup -> units in region matching condition -> (Number of Living units in (Any units in (Region((Position of (Picked unit)), 1.0)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
I not really understand your question but if you want to use it for more units, use pick each unit -> on entire map....
also for the example I set the region for circle to region positioned to picked unit....
Hi Guys, I need help for a trigger... once again. I am unable to create this condition to fire the trigger:
Fire trigger when no unit is in the vicinity of that unit type.
Well, I want that trigger to run when there is no unit, which can be any unit, nearby to a specific unit type. not only one unit, but one type. Do I have to make this via unit groups? But then, does this one particular unit from this unit type respond to that trigger, even if other units of the group do not match the condition (=units are nearby)? I am too stupid to figure that out by my own... :/
Thanks :)
Sounds like a nice troll post to me. If it's not, reword your question.
Great to be back and part of the community again!
@Anarcy: Go
You can try making a region, then have a periodic event: every 1 second, move that region to your unit. Then check for conditions within that region. If there's no unit of certain type within that region, fire off your trigger.
@Anarcy: Go
Edit: what he said
Create a region around the unit. Update that region if your unit moves. Make trigger with periodic event. Check number of units in region, and if it's greater than 1, fire your actions.
@TacoManStan: I do not know why you think this is a troll post... I'm just beginning to work with triggers and was too tired to be able to explain my problem carefully.
@sandround, hunterx3: Your solution would mean extremely much work, as I got 80 units that need to be checked. And I guess one region for the whole unittype would not do the trick.
Isn't there some condition I can use to simply check if units are in range 3.0 (actual number does not matter atm) to any supply depot (as an example).
@Anarcy: Go
Hmm, you could try making a new ability to give to your unit and set the ability autocast condition. In this case, put a tag on your supply depot to be 'hover' (as example). Then the ability autocasts when a 'hover' unit is in range.
Now under triggers, whenever the ability is executed, do your thing... that's one way to check if a unit comes into range of another.
@sandround: Go
Im pretty sure you can also validate for anything, such as a certain unit type, so there is no need for a special classification.
(if than else) condition -> number of unit in unitgroup -> units in region matching condition -> (Number of Living units in (Any units in (Region((Position of (Picked unit)), 1.0)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
I not really understand your question but if you want to use it for more units, use pick each unit -> on entire map....
also for the example I set the region for circle to region positioned to picked unit....
Edit: bit too late... ;)
This could do your job:
Cheers
Then
I am really grateful for your answers, I will try it out as soon as I can! :)