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

[Trigger] Event for checking when a unit

Status
Not open for further replies.
Level 5
Joined
Sep 10, 2006
Messages
185
Here's what I did... but no worky =/

  • Tornado Off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order((Name of Storm Slow (Storm))))
    • Actions
      • Set Tornados = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tornado))
      • Unit Group - Pick every unit in Tornados and do (Unit - Kill (Picked unit))
      • Custom script: call DestroyGroup(udg_Tornados)
      • Trigger - Turn off (This trigger)
 
Level 5
Joined
Sep 10, 2006
Messages
185
Dreadnought[dA];714644 said:
lol

issued order = unimmolation

that should work

Thanks, I guess now there's something wrong with my actions, but the trigger does get run.

  • Actions
    • Set Tornados = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tornado))
    • Unit Group - Pick every unit in Tornados and do (Unit - Remove (Picked unit) from the game)
    • Custom script: call DestroyGroup(udg_Tornados)
    • Trigger - Turn off (This trigger)
Does anyone see anything wrong with this? Tornado is a unit spawned by a trigger that turns this one on.
 
Last edited by a moderator:
Level 5
Joined
Sep 10, 2006
Messages
185
I do see the error of triple posting:angry:

But other than that, i can only see that it will remove other players tornados as well, not MUI.

Only one person can pick each tower race, and the best towers of each race are limited to 1 per player. (So why bother making it MUI?)

As of now it doesn't remove the tornados =/ I've tried to kill them too.
 
Level 10
Joined
Mar 9, 2008
Messages
669
That tornadoes variable looks un-needed. I don't know if the fact that it's a variable matters, but it's not MUI soooo
  • Tornado Off
  • Events
    • Unit - A unit is issued an order with no target.
  • Conditions
    • (Issued order) equal to (unimmolation)
  • Actions
    • Unit Group - Pick every unit in (Units in Playable map area) matching ((Unit-type of matching unit equal to Tornado)) and do ((Unit - Kill (Picked Unit))
Try it like that, I know having the variable and then removing it is cleaner, but you never know.
 
Level 17
Joined
Jan 21, 2007
Messages
2,014
Only one person can pick each tower race, and the best towers of each race are limited to 1 per player. (So why bother making it MUI?)

As of now it doesn't remove the tornados =/ I've tried to kill them too.

Oh, you didn't say that.

anyway i don't know why it wouldn't remove the tornados, but i think it lies within your first action.
I don't use that version to get that effect though.
Try to do it like me.

Actions
Pick all units in (Playable map area) matching condition (unit-type of (Matching unit) is equal to tornado.
Loop
Add (Picked unit) to (Tornados)
Pick all units in (Tornados) and do actions
Loop
remove (Picked unit) from the game
 
Level 5
Joined
Sep 10, 2006
Messages
185
Actions
Pick all units in (Playable map area) matching condition (unit-type of (Matching unit) is equal to tornado.
Loop
Add (Picked unit) to (Tornados)
Pick all units in (Tornados) and do actions
Loop
remove (Picked unit) from the game

  • Tornado Removal
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(unimmolation))
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tornado)) and do (Unit Group - Add (Picked unit) to Tornados)
      • Unit Group - Pick every unit in Tornados and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
No work still =/
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Immolation leaves a buff on the affected unit if I am not mistaken. Thus you can detect when it is turned off by when the buff is lost. Also remember that as it chews mana it turns off when there is not enough mana and thus it will not register an order being given in that situation.
 
Level 5
Joined
Sep 10, 2006
Messages
185
Y, that would probably work, check for the immolation (caster) buff instead in conditions, or the edited version. If you just removed it from the ability, it will have the default buff(immolation(caster))

How do I check if a unit has a certain buff? the only buff condition I see is "Buff equal to buff".

also, what event would I use? A unit stops ability ?
 
Level 5
Joined
Sep 10, 2006
Messages
185
Well, that's a common "newbie" error that also i did before. It's a little "hidden"

It's under Boolean - Unit has specific buff


  • Tornado Removal
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Triggering unit) has buff Immolation (Caster)) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tornado)) and do (Unit Group - Add (Picked unit) to Tornados)
      • Unit Group - Pick every unit in Tornados and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
Still no go =/
 
Level 5
Joined
Sep 10, 2006
Messages
185
Thats it, 20 seconds of work.

Take this trigger, specify your tower as the unit which is ordered and put the actions in there.

Ty, that part works but...

  • Immolation Detection
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(unimmolation))
      • (Unit-type of (Ordered unit)) Equal to Weather Control Center
    • Actions
      • Game - Display to (All players) the text: TEST
      • Set Tornados = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Tornado))
      • Unit Group - Pick every unit in Tornados and do (Unit - Remove (Picked unit) from the game)
      • Custom script: call DestroyGroup(udg_Tornados)
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Tornado Mana <gen>
When I put it in my map, and changed the actions, all it does is the game display. I don't see why the rest of the actions don't work. (If it helps the tornadoes are based off of the default tornados).
 
Status
Not open for further replies.
Top