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

Need help with trigger/destructible

Status
Not open for further replies.
Level 8
Joined
Jul 17, 2004
Messages
283
For some reason, this won't work. The unit will attack the destructible and not hold position.

  • Events
    • Unit - A unit Is issued an order targeting an object
  • Conditions
    • (Issued order) Equal to (Order(attack))
    • (Destructible-type of (Target destructible of issued order)) Equal to Treasure Chest
  • Actions
    • Unit - Order (Triggering unit) to Hold Position
But if I add this Wait, it will work.

  • Events
    • Unit - A unit Is issued an order targeting an object
  • Conditions
    • (Issued order) Equal to (Order(attack))
    • (Destructible-type of (Target destructible of issued order)) Equal to Treasure Chest
  • Actions
    • Wait 0.05 seconds
    • Unit - Order (Triggering unit) to Hold Position
All I am trying to do is order the unit to hold position when attempting to attack the destructible. Is there any way I can do this without using the Wait?? -- because I need it to be MUI.
 
Level 8
Joined
Jul 17, 2004
Messages
283
It is mui. If you want it to be even more mui use 0.01 seconds.

I used even a 0.00 Wait, and it worked. O.O Yeah, I guess I'll just use the Wait then.

Also, thanks for the suggestion, Maker. Just seems more trouble than it's worth though.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The thing is, waits are not accurate, that 0.00 second wait is actually 0.1-0.2 seconds in single player, And in that time, the unit will move a bit. Using a timer, the unit will not move.



  • Untitled Trigger 112
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • (Destructible-type of (Target destructible of issued order)) Equal to Summer Tree Wall
    • Actions
      • Set i = (i + 1)
      • Set units[i] = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i Equal to 1
        • Then - Actionst
          • Countdown Timer - Start timer as a One-shot timer that will expire in 0.00 seconds
        • Else - Actions
  • Untitled Trigger 113
    • Events
      • Time - timer expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to i, do (Actions)
        • Loop - Actions
          • Unit - Order units[(Integer A)] to Stop
      • Set i = 0
 
Status
Not open for further replies.
Top