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.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: Excalibur