• 🏆 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!

[Trigger] Why won't this simple thing work?

Status
Not open for further replies.
Level 19
Joined
Aug 16, 2007
Messages
881
I've got a trigger that should detect every enemie of the item using player. But this trigger just won't work! Why? The minimap isn't pinged at all... Please take a look.

Trigger:

  • Enemie Detecter
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Item: |CFF82CA9CEnemie Detecter|r
    • Actions
      • Set PlayerGroup[1] = (Player group((Owner of (Triggering unit))))
      • Set UnitGroup = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Enemie (1)
                  • (Unit-type of (Picked unit)) Equal to Enemie (2)
                  • (Unit-type of (Picked unit)) Equal to Enemie (3)
                  • (Unit-type of (Picked unit)) Equal to Marine (1)
            • Then - Actions
              • Set temp_point[1] = (Position of (Picked unit))
              • Cinematic - Ping minimap for PlayerGroup[1] at temp_point[1] for 2.00 seconds, using a Flashy ping of color (100.00%, 100.00%, 100.00%)
              • Custom script: call RemoveLocation(udg_temp_point[1])
            • Else - Actions
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Custom script: call DestroyForce(udg_PlayerGroup[1])
Thanks.
 
Level 4
Joined
May 4, 2008
Messages
113
I can't see the problem right now.

Try displaying a message right at the front of the trigger that just shows a random string, just to check if the trigger is being triggered at all. It might be a problem with your events, or your item isn't being used properly or something.

You COULD change your events/conditions to:

Events: Unit - A unit starts the effect of an ability
Conditions: (Ability being cast) Equal to <THE ABILITY YOUR ITEM CASTS>

But it might not be a problem with your events. Try that debug method I wrote at the top and tell me if it displays anything.
 
Level 19
Joined
Aug 16, 2007
Messages
881
Hmm, I've created 3 debug messages. And... Well. Not even the first message shows up and I put it first on the action list. So something is wrong with the event or the condiiton.


Nevermind,

ZiggyMcjoney, I did like you told me:

Events: Unit - A unit starts the effect of an ability
Conditions: (Ability being cast) Equal to <THE ABILITY YOUR ITEM CASTS>

And it worked, thanks! +rep
 
Level 11
Joined
Nov 15, 2007
Messages
781
I'm pretty sure that event only detects items being used when they're used by a hero. GUI in general has it in its head that only heroes can use items.
 
Status
Not open for further replies.
Top