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.
[07:29 am]
Zycorax -- :wob:
[03:48 am]
O)FaRTy1billion[MM] -- :wob:
[03:14 am]
Symmetry -- :wob:
[01:03 am]
IskatuMesk -- that's a loaded sentence if I ever snorted one
[2026-7-09. : 2:31 am]
Symmetry -- lot of 0s in them boxes, someone better hit it big
[2026-7-05. : 1:14 am]
l)ark_ssj9kevin -- Rectal!!!
[2026-7-05. : 12:13 am]
IskatuMesk -- u guys ever look at the "Backend performance improvements" line and kinda you know 👀
[2026-7-03. : 4:25 pm]
l)ark_ssj9kevin -- oh wow it's kind of like archipeligo but solo
[2026-7-03. : 9:43 am]
Oh_Man -- makes me wonder tho, a brood war achievement project culd be quite something, following the design methodology of SC2 achieves
[2026-7-03. : 9:43 am]
Oh_Man -- intresting concept, i see starcraft N64 is on there, most of the achieves seen bare bones though
Please log in to shout.


Members Online: jun3hong