Help with trigger

NunuBot

New Member
Reaction score
0
Hey guys. I'm trying to make a collision event-- Whenever a hero comes within 10 range of a zergling, he is killed. However, I can't say Enters a distance from [Any Unit

Any ideas?

I basically just have a bunch of zerglings spawning and running in random directions, and people have to dodge them. I want to make them die if they come into a close range.
 

Dave312

Censored for your safe viewing
Reaction score
269
I would actually do it via the data editor. You could give zerglings a passive aura ability which will deal massive damage (ie instant kill) to any heroes near it. Should be fairly simple to make. There are a few tutorials around on making auras if you are unsure on how to do it.
 

ZeroPoints

New Member
Reaction score
8
ye ye +1 to daves response. search ability kinda thingy that does damage of "KILL" its an option in their think its with the spell/splash/ options.
beside all that what was wrong with enters a distance from "blah zergling" or whatever? hwat problems were you running into too
 

NunuBot

New Member
Reaction score
0
I'm just having trouble making triggers in the sc2 editor that I could have made in the wc3 editor...

An example:
Wc3- Pick every unit in (unit in playable map area)
Sc2- Pick every unit in ( ???) It wont let me pick just a region. It's another unit group within a region matching a condition. It puts me in an endless chain of unit groups rather than just ending with (Units in region)
EDIT: I figured out how to do that ^

In the part up top, the problem is that I can't just say Enters a distance from (ANY UNIT); it makes me pick a single unit rather than any unit. Also, conditions are a lot harder to work with in the sc2 editor as well as custom units.
 

celerisk

When Zerg floweth, life is good
Reaction score
62
Code:
Kill near Zergling
    Events
        Timer - Every 0.1 seconds of Game Time
    Local Variables
        Zerglings = (Zergling units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) <Unit Group>
        Zergling = No Unit <Unit>
        ZerglingPlayer = 0 <Integer>
        ZerglingRegion = No Region <Region>
        Enemies = (Empty unit group) <Unit Group>
    Conditions
    Actions
        Unit Group - For each unit Zergling in Zerglings do (Actions)
            Actions
                Variable - Set ZerglingPlayer = (Owner of Zergling)
                Variable - Set ZerglingRegion = (Region((Position of Zergling), 2.0))
                Variable - Set Enemies = (Units in ZerglingRegion having alliance Enemy with player ZerglingPlayer matching Required: Ground, Visible; Excluded: Structure, Missile, Stasis, Dead, Hidden, Invulnerable, with at most Any Amount)
                Unit Group - Pick each unit in Enemies and do (Actions)
                    Actions
                        Environment - Deal damage using Zergling - Claws (Damage) on (Picked unit) from Zergling with 9001.0 extra damage


Not that I would recommend it... Data Editor all the way.
Still, it's sort of funny to see this in action.

And, yes, this is "good enough" for testing.
Unfortunately, doing this trigger is wayyyyyyyy faster than getting anything done in the Data Editor.

Well... :p



> It puts me in an endless chain

A classic.
Click on the ( to get out of it.
While this is "solved" here, remember it for future use.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top