• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Movement Trigger Doesn't Work

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
Hi, for whatever reason this trigger doesn't work. It's meant to simply make the units in the group move when they stop and the same for the hero. Any ideas?

  • Make Unit Move When Stop
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Ordered unit) is in HordeGroup) Equal to True
          • (Ordered unit) Equal to Zombie_Hero
      • (Issued order) Equal to (Order(stop))
    • Actions
      • Game - Display to (All players) the text: 1
      • Unit - Order (Ordered unit) to Attack-Move To ZombieTarget
EDIT: The Game Message is there for me to try seeing when the trigger works but I never got to see the message (so it doesn't work)
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
It's hard to tell on what the variables "HordeGroup", "Zombie_Hero" and "ZombieTarget are set to. I would suggest posting all triggers in relations with those variables. It would be much easier to identify the problem.

And how about just change the order to this:

  • Unit - Order (Ordered unit) to Attack ZombieTarget
I was testing a map and taking some guesses on your problems and I made this: but not actually MUI as far as I know but maybe it might give some ideas to you
 

Attachments

  • Test - Order.w3x
    489.4 KB · Views: 50
Level 13
Joined
Oct 16, 2010
Messages
731
HordeGroup = This group is the main group of enemies, as they spawn they get added to the group.
Zombie_Hero = This is the enemy hero, it is also set after they spawn.
ZombieTarget = This is a point that is set at the beginning of the game, it is set to the castle that the player defends.

Changing the order to that would mean they would avoid attacking anything else until they get to the castle and they will only attack the castle. I want them to attack everything along the way too.

EDIT: I've added a testing trigger that simply tells Zombie_Hero to stop. If I tell them to stop via trigger it seems to work fine but not when they stop on their own.

EDIT: I just tried out your map and still the same issue occurred. I killed the knight but afterwards when my hero had in fact stopped he wasn't given the order to stop, it was only completed when i clicked the stop button (i tried moving him around but after finishing the movements nothing happened). Anyway I think I'll just change it to a periodic timer that moves them all every 45 seconds or something. I only wanted this trigger as it'd make enemies that have gone back to their spawn point attack again as soon as they stopped. Ahh well
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Didn't read anything so...

When a unit is stopped/hold position. After the initial instance of gettinng the stop order the order changes to null. This might of been said.
 
Level 5
Joined
Jan 27, 2014
Messages
164
I only wanted this trigger as it'd make enemies that have gone back to their spawn point attack again as soon as they stopped
For this, you'll need to go to Terrain Editor > Advanced tab > Gameplay constant > Creep - Guard distance/return time/etc and set those values to something sensible so that the creeps don't return to the original position.

In any case, you can also do the periodic trigger. Could be useful.
 
You somehow assumed that the "stop" order is issued as soon as any previous order is completed. That's not the case. "stop" only happens when the unit is actually issued a "stop" order (in other words uses the stop "ability").

Unfortunately, there is no easy solution to what you are trying to achieve. Scanning units periodically for no order will return a false positive if the unit is auto-engaging another unit (it still has no order in that case), so that isn't your solution either.

So basicly you need to track if the unit is currently not attacking/moving in addition to checking for the current order.
 
Status
Not open for further replies.
Top