• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Checking for any new unit

Status
Not open for further replies.
Level 5
Joined
Jul 31, 2020
Messages
103
Hey.

To get it out of the way right at the start, you can hit me with JASS scripts too, I understand and use them just fine.

Looking for a way to detect any freshly spawned unit, including trained units, trigger-spawned units, summoned units. Basically everything. This is the reason I feel the need to ask; I'm positive I have a way of achieving this outlined in my mind already, but I want to make sure I'm not forgetting some edge case somewhere. And someone might be able to show me if there's some added difficulty I'm not thinking of.

No unit indexer replies, thanks.
 
I think the below should work:
  • Events
    • Unit - A unit enters (Playable map area)
  • Conditions
    • (Unit - type of (Triggering Unit)) equal to YOUR_UNIT_TYPE
  • Actions
    • Trigger - Do stuff with Triggering Unit

That was the very first thing I thought of. The reason I made this thread is the chance someone might have experience with this, and might know some obscure edge case where something like that fails.

Edit: Guess not then.
 
Last edited:
Status
Not open for further replies.
Back
Top