• 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.

How to trigger a unit that's yet on the map?

Status
Not open for further replies.
Level 1
Joined
Nov 6, 2018
Messages
3
upload_2018-11-6_18-33-2.png


Unit takes a damage, then it is ordered to cast polymorph to the source of the damage. No problem there it works just fine. But, only one unit does that and that unit is on the map. What about units that are yet to be produced? I can't work it around. Anyone help me?
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,010
The easiest and quickiest way is to have another trigger with event: unit enters region
and action: Trigger - Add to (This trigger) the event (Unit - (Triggering unit) Takes damage)
Maybe you probably want to filter units, that's up to you.
Also whats with this condition you have? "True Equal to True" doesn't do anything there
 
Level 6
Joined
Jul 8, 2018
Messages
129
You can use region triggers or you can use unit type triggers. There are a couple of options you can do for that ;p normally I use regions for that and sometimes unit type triggers if its a one of a kind unit.
 
Level 1
Joined
Nov 6, 2018
Messages
3
The easiest and quickiest way is to have another trigger with event: unit enters region
and action: Trigger - Add to (This trigger) the event (Unit - (Triggering unit) Takes damage)
Maybe you probably want to filter units, that's up to you.
Also whats with this condition you have? "True Equal to True" doesn't do anything there
Thanks for replying! I have questions:
1) So do I keep the first trigger just like it is now? I want to start a meelee game with bots. Now if I keep the first trigger as it is, the unit will be on the map when the game starts.
2) I've been trying to do so, but somethings amiss
upload_2018-11-7_1-22-58.png


PS. I didn't really know what to put in condition
 
Last edited:
Level 1
Joined
Nov 6, 2018
Messages
3
You can use region triggers or you can use unit type triggers. There are a couple of options you can do for that ;p normally I use regions for that and sometimes unit type triggers if its a one of a kind unit.
Thanks for replying. I do understand the logic, but It doesn't work in my case (probably doing something wrong). Do you have a screenshot of the trigger? It woul'd mean alot!
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Your two options are the following. If the units are created through triggers you'll do this:
  • Unit - Create one YOUR_UNIT_TYPE for <whichever player> at <whatever point> facing (Default building facing degrees)
  • Trigger - Add to Knight of Sheeps ac 1 <gen> the event (Unit - (Last created unit) takes damage)
If the units are produced by players you'll do this:
  • Events
    • Unit - A unit enters (Playable map area) //don't use "entire map", pma is superior and works in nearly every situation
  • Conditions
    • (Unit - type of (Triggering Unit)) equal to YOUR_UNIT_TYPE
  • Actions
    • Trigger - Add to Knight of Sheeps ac 1 <gen> the event (Unit - (Triggering Unit) takes damage)
 
Status
Not open for further replies.
Top