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

Follow/Guard action on World editor.

Status
Not open for further replies.
Level 2
Joined
Jul 15, 2018
Messages
7
Hello everybody. Im trying to make a passive summoning system, like in ARPG. You summon and the summoning follow the caster until summoning end or they die. In game you have th possibility to use the patrol command on another unit to follow and repeat his actions. But in world editor i dont find this option in : Unit - Issue orderd targetting unit. Any idea how i can do it?
 
Level 39
Joined
Feb 27, 2007
Messages
5,019
There's an order event for patrol, but the GUI probably doesn't show it (like stop, for example). You'll have to detect the order by its number. Make this trigger:
  • Events
    • Unit - A unit is issued an order
  • Conditions
  • Actions
    • Custom script: call BJDebugMsg(I2S(GetIssuedOrderId()))
It will display a 6-8 digit number on the screen when you click patrol. Use that number in conjunction with this trigger:
  • Events
    • Unit - A unit is issued an order
  • Conditions
  • Actions
    • Custom script: if GetIssuedOrderId() == THE_NUMBER_HERE then
      • -------- do yo shit here --------
    • Custom script: endif
Upon furthee thought this might actually work. The event should exist!
  • Events
    • Unit - A unit is issued an order targeting a unit
  • Conditions
    • (Issued order) equal to THE_NUMBER_HERE
    • --------- the above line is an integer comparison, not order comparison --------
    • -------- there might be some Order to Integer conversions, or the reverse --------
  • Actions
    • -------- do your shit --------
 
Last edited:
Status
Not open for further replies.
Top