Staredit Network > Forums > SC2 Assistance > Topic: The use of random unit from a unit group
The use of random unit from a unit group
This topic is locked. You can no longer write replies here.
Apr 29 2010, 2:09 pm
By: Neki  

Apr 29 2010, 2:09 pm Neki Post #1



Okay so I have this trigger:
Variable - Set Random = (Random Living unit from (Any units in (Region(Position, 6.0)) owned by player Any Player matching (No Value), with at most Any Amount))
Basically, set Variable Random equal to a random living unit within a circle (radius 6) around position (position of the unit casting the spell) is what this is doing. Two things I don't get, how do unit filters work? If I exclude "self", does that mean I am not selected within this random radius? Because every time I try that, the spell always casts on myself. The second is, what does the last variable do, "any amount", you can't store more than one value in this "unit variable" can you?

This trigger also always manages to target some random thing off the map, I have no idea why. So when I take the position of the unit, it returns an overflow (error).




None.

Apr 29 2010, 5:20 pm payne Post #2

:payne:

Not sure about what you're asking, but here's some possible answers:
In unit filters, you normally let the three pre-selected value as they are (Missiles, Dead and I-don't-remember). That means these will not be included into the trigger count.
The 'Any amount' can be set to any number. It restricts the trigger based on its value: if it'd be 5, the trigger wouldn't run as long as there is more than 5 units (that meet the UnitFilter conditions) within the region.

Did I help? :S



None.

Apr 29 2010, 11:37 pm Neki Post #3



That makes sense, the amount part, I managed to get everything working besides effects, how do I add special explosions/effects to a map?



None.

Apr 30 2010, 6:29 am payne Post #4

:payne:

Do you mean explosions/effects already existing or custom ones?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[03:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[12:51 am]
Oh_Man -- definitely EUD
[09:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[09:35 pm]
Vrael -- that is insane
[09:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: NudeRaider, Roy