trigger for item

Status
Not open for further replies.
Level 25
Joined
Mar 29, 2020
Messages
1,466
  • CantTouchThis
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Item-type of (Target item of issued order)) Equal to Mask of Death
    • Actions
      • Unit - Order (Triggering unit) to Stop.
      • Game - Display to (Player group((Triggering player))) the text: You can not pick up...
should be as simple as this. when you issue a new order it replaces the previous order. so this will happen when the player clicks on it. If you do want the hero to walk to the item and try picking it up (and only then play the error message) then you want to let the hero pick it up and drop it instantly with a trigger (for the player it will just seem like they can't pick it up).
 
empty.gif
join.gif
unit.gif
Unit - Order (Triggering unit) to Stop.
all trigger is work but not Stop
massage is showing but a hero is moving. why??!!!
 
  • CantTouchThis
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Item-type of (Target item of issued order)) Equal to Mask of Death
    • Actions
      • Unit - Order (Triggering unit) to Stop.
      • Game - Display to (Player group((Triggering player))) the text: You can not pick up...
should be as simple as this. when you issue a new order it replaces the previous order. so this will happen when the player clicks on it. If you do want the hero to walk to the item and try picking it up (and only then play the error message) then you want to let the hero pick it up and drop it instantly with a trigger (for the player it will just seem like they can't pick it up).
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Item-type of (Target item of issued order)) Equal to Kelen's Dagger of Escape
    • Actions
      • Unit - Pause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Unpause (Triggering unit)
      • Set stoper = (stoper + 1)
      • Game - Display to (All players) the text: (String(stoper))
but it is working perfectly.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I've found that the "Stop" order method doesn't always work and depends on the situation. For example this same issue happens if you try to interrupt a Worker's order to build a structure.

I imagine it has something to do with the execution of the orders. The unit must be getting ordered to "Stop" BEFORE the order to pick up the item happens, despite the fact that you're issuing the "stop" after the pick up order has already been made. That or the "Stop" order is completely ignored for some strange reason.

Anyway, if "stop" doesn't work and pause/stop/unpause doesn't work then I found you can order the unit "move" to a point offset by a very small distance like 0.01, this seems to take precedence.
 
Last edited:
Status
Not open for further replies.
Top