Staredit Network > Forums > SC2 Assistance > Topic: All Unit Leave at this point.
All Unit Leave at this point.
Aug 16 2010, 7:28 pm
By: Septhiroth  

Aug 16 2010, 7:28 pm Septhiroth Post #1



How do i make it so that "All units" must leave near a certain "unit" inorder to allow my actions to occur?



None.

Aug 16 2010, 8:00 pm Temp Post #2



You could have a trigger keep track of how many units are in range of the unit (There is a unit enters range of unit event). And use that as a condition for your other actions. There is probably a better way but that is an easy solution.



None.

Aug 16 2010, 8:22 pm Septhiroth Post #3



I did that but it doesnt give me a numberical value on how many units that can enter in.



None.

Aug 16 2010, 8:29 pm TheFreak Post #4



Hmm i think i have an idea but I need a little bit more info. Which would be the triggering event ? Or do you want something like When there's 0 units within 2 meters of Unit X do "these actions" ?

~TheFreak



None.

Aug 16 2010, 9:05 pm Temp Post #5



Quote from Septhiroth
I did that but it doesnt give me a numberical value on how many units that can enter in.


You would need to keep track of that yourself. When a unit enters the area increase a variable and when it leaves decrease it.



None.

Aug 16 2010, 9:14 pm shmeeps Post #6



You could also use a unit group, add a unit if it is too close, and remove it if it gets far enough away or dies, and then just use the function "Number of units in Unit group".



None.

Aug 17 2010, 12:38 am Septhiroth Post #7



Quote from TheFreak
Hmm i think i have an idea but I need a little bit more info. Which would be the triggering event ? Or do you want something like When there's 0 units within 2 meters of Unit X do "these actions" ?

~TheFreak

Yea, I would like something like 0 units ear 2 meters of x unit.

Quote from Temp
You would need to keep track of that yourself. When a unit enters the area increase a variable and when it leaves decrease it.

~Temp

How do I use Varables ? XD



None.

Aug 17 2010, 3:54 am TheFreak Post #8



Ok that is good enough.

So, what you need to do is set up a new Trigger and make the Event will be Any Unit Leaves a distance of (Whatever distance you want) from (Whatever unit you want)

Then you create 2 Local Variables. One of type Region and one of type Unit Group.

Set the local variable of type region to be Region from circle( (Poision of (Whatever unit you want to have no units around), (Whatever range you want))
Set the local variable of type Unit Group to be Any unit in The local variable you created for region.

Now add a comparison condition that checks; Number of units in unit group ( local variable of type unit group) == 1

and in actions add whatever actions you want to do when there is no one near your specified unit.

Note: this only works when units leave. If you want this to work EVERY time your unit has no other units around, replace the event for a periodic event of every 1 second or something.

Attached is a picture so everything is more clear.

Hope this is what you need.

~TheFreak

Attachments:
this.JPG
Hits: 1 Size: 31.61kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Roy, Oh_Man, Risingvge