• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Why it is not working when i try to detect entering unit?

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,137
Hello everyone. This trigger works well

  • Ormanci orman keserse
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of GOD_Ability[1] for (Killing unit)) Greater than or equal to 1
      • And - All (Conditions) are true
        • Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Triggering unit)) Equal to Murloc Flesheater (level 1)
              • (Unit-type of (Triggering unit)) Equal to Treant (level 2)
              • (Unit-type of (Triggering unit)) Equal to Satyr (level 3)
              • (Unit-type of (Triggering unit)) Equal to Gnoll Warden (level 4)
              • (Unit-type of (Triggering unit)) Equal to Spider (level 4)
              • (Unit-type of (Triggering unit)) Equal to Ogre Magi (level 5)
              • (Unit-type of (Triggering unit)) Equal to Sasquatch (level 7)
              • (Unit-type of (Triggering unit)) Equal to Mud Golem (level 5)
              • (Unit-type of (Triggering unit)) Equal to Troll Warlord (level 6)
              • (Unit-type of (Triggering unit)) Equal to Ogre Lord (level 10)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Murloc Flesheater (level 1)
        • Then - Actions
          • Player - Set (Owner of (Killing unit)) Current gold to (((Owner of (Killing unit)) Current gold) + 20)
          • Hero - Add 15 experience to (Triggering unit), Hide level-up graphics
          • Game - Display to (Player group((Owner of (Killing unit)))) for 2.00 seconds the text: Ormanci oldugun ici...
As you can see, my condition is works.

  • (Level of GOD_Ability[1] for (Triggering unit)) Greater than or equal to 1
But this is not.

  • ORMAN KERE ANANI SIKIM Copy
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Level of GOD_Ability[1] for (Triggering unit)) Greater than or equal to 1
    • Actions
      • Game - Display to (All players) for 3.00 seconds the text: yepp
Why it cannot detect owner of this ability?
 
Level 17
Joined
Jun 2, 2009
Messages
1,137
The only thing I can think of is that GOD_Ability[1] isn't Set yet when the unit enters the map or the unit doesn't have the ability.
Alternatively i have added 10 seconds wait but still it cannot detect. But when i go and kill neutral creeps, it can detect owner of this ability. Any suggestions for the debug? Hmmm wait. It will not change anything. How can i create debug message about that?
 
Level 17
Joined
Jun 2, 2009
Messages
1,137
My issue is, when the unit uses it's items or abilities (summon creature) i want to count summoned units works for first trigger. Any alternative solutions?

Edit: Wait. This is worked. Now i am going for the full test. I will edit my message for the final result.

  • Events
    • Unit - A unit enters (Entire map)
  • Conditions
  • Actions
    • Wait 10.00 seconds
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of GOD_Ability[1] for (Triggering unit)) Greater than or equal to 1
      • Then - Actions
        • Set OrmanciDevil = (Triggering unit)
        • Game - Display to (All players) for 1.00 seconds the text: (Name of OrmanciDevil)
      • Else - Actions
Yes it was because of the timing. When i add 10 seconds wait, it can detect now.
 
Last edited:
Status
Not open for further replies.
Top