• 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] Simple trigger not working...

Status
Not open for further replies.
Level 9
Joined
May 22, 2009
Messages
491
Ok so.... Its most likely the simplest fix in the world I just CAN NOT figure it out no matter what... Heres the trigger...

Events
Unit - A unit leaves Instance <gen>

Conditions
(Number of units in (Units in Instance<gen>)) Equal to 0

Actions
Unit - Create 12 blah blah blah
Unit - Create 1 blah blah blah

I know its the condition because if I delete that part it all works... So basically I want it to check if anyone is in a region and if not spawn some things in it... Sounded so simple >.< Thank you so much!
 
Level 4
Joined
Apr 20, 2009
Messages
106
My guess would have to be that you still have a unit hiding somewhere in the region Instance. I've replicated what you're showing in a small map with my own region "Instance" and the trigger below.

  • Events
    • Unit - A unit leaves Instance <gen>
  • Conditions
    • (Number of units in (Units in Instance <gen>)) Equal to 0
  • Actions
    • Game - Display to (All players) the text: Kapachka
Kapachka was shown every single time I removed my test unit from the area.

Oh, and it's good to see you're still alive and kicking, Bwathke. It's been a while :)

EDIT: Furthermore, to test my guess, you can use a simple trigger like the following.

  • Events
    • Unit - A unit leaves Instance <gen>
  • Conditions
  • Actions
    • Game - Display to (All players) the text: (String((Number of units in (Units in Instance <gen>))))
 
Level 9
Joined
May 22, 2009
Messages
491
If/Then/Else did not work =( And I searched everywhere, no hidden creatures... I do have doodads and some blue fire or something and corpses... Thats it =/ Thanks for the replies! ........I did your test......... It says 14....... And it says 14 if I kill nothing... Could it be the corpses?
 
Level 4
Joined
Apr 20, 2009
Messages
106
Do you have any dead units that haven't fully decayed yet? I just tried it out, until a unit is completely gone, and not just a corpse on the ground, it's considered a unit and will make your trigger not fire. Also, try my second trigger, and see what it says when you leave the region.

If that test didn't work, try this one. It should help you find out what is inside your region and where it's hiding.

  • Events
    • Unit - A unit leaves Instance <gen>
  • Conditions
  • Actions
    • Set UnitGroup = (Units in Instance <gen>)
    • Unit Group - Pick every unit in UnitGroup and do (Actions)
    • Loop - Actions
      • Game - Display to (All players) the text: (Name of (Picked unit))
      • Set Point = (Position of (Picked unit))
      • Cinematic - Ping minimap for (All players) at Point for 2.00 seconds
      • Custom script: call RemoveLocation(udg_Point)
    • Custom script: call DestroyGroup(udg_UnitGroup)
 
Level 4
Joined
Apr 20, 2009
Messages
106
Advanced - Gameplay Constants - Decay Time (sec) - Bones

You can set that to something very small. Or you could remove them instantly with a trigger, but I personally would still like at least some decaying. Whichever you prefer.
 
Status
Not open for further replies.
Top