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.
[2026-6-23. : 3:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[2026-6-22. : 8:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
Please log in to shout.


Members Online: RIVE, NudeRaider