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

[Trigger] Make the replaced unit move to the rally point

Status
Not open for further replies.
Level 19
Joined
Sep 4, 2007
Messages
2,826
The title says it all.
  • Militia
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • |Cffff0000Militia |cffffcc99Training Equal to (Item-type of (Item carried by (Triggering unit) of type |Cffff0000Militia |cffffcc99Training))
          • ((Hero manipulating item) is Mechanical) Equal to False
    • Actions
      • Unit - Replace (Triggering unit) with a |Cffff0000Militia using The new unit's default life and mana
      • Unit - Order (Last replaced unit) to Attack-Move To (Rally-Point of (Selling unit) as a point)
How to make this trigger work?
  • Unit - Order (Last replaced unit) to Attack-Move To (Rally-Point of (Selling unit) as a point)
Thanks in advance.
 
Level 4
Joined
Sep 9, 2004
Messages
112
Well first off, it looks like your color codes on that item don't have the correct ending and try this..

  • Unit - Move (Buying unit) instantly to (Position of (Selling unit))
  • Camera - Pan camera for (Owner of (Buying unit)) to (Position of (Selling unit)) over 0.05 seconds
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Well, did you try to add a unit variable and set it to the last replaced unit? Then just add a wait with about 0.05 seconds in between the replacing and proclaiming so it goes something like this:

Code:
Action - Unit - Replace (Triggering unit) with a |Cffff0000Militia using The new unit's default life and mana
       - Set VARIABLE = Last replaced unit
       - Wait 0.05
       - Unit - Order VARIABLE to Attack-Move To (Rally-Point of (Selling unit) as a point)

If this does not work, your problem is in the selling unit. Perhaps you should create a unit array and put all the merchants on it. Then simply detect if the buying unit is within the range of vendor 1,2,3,etc and order it, that is the replaced unit, to move to the rally point of that unit.

Hope this helps,

Kafana
 
Status
Not open for further replies.
Top