• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Instant turnrate

Level 10
Joined
Dec 17, 2011
Messages
355
Hi! :)

I'm working on a hero arena that would be quick paced, centered around skillshotss/dodges (somewhat like league of legends).
Unfortunately, I have just realized that turning units fast in wc3 is not as easy as I thought...
Seemingly the maximum turnrate is hardcoded,so what options do I have with triggers?

I'd like to turn the unit instantly (or as fast as possible) to the point of given order, even for movement and casting spells!

The only theoretical solution that came into mind is removing the unit and creating another unit with the desired facing, but for a hero arena it sounds unfeasable.
It would mess up all the triggers, buffs etc on the unit... :/

Is there a workaround or I have to forgot about it and rethink my approach?

Thanks in advance!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
I'd like to turn the unit instantly (or as fast as possible) to the point of given order, even for movement and casting spells!
Hello, there's an action as of version 1.31 (maybe 1.32+) that will change a unit's facing angle IMMEDIATELY.

Here's a working example:
  • Instant Turn Order POINT
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Set VariableSet Instant_Order_Unit = (Triggering unit)
      • Set VariableSet Instant_Order_Point[0] = (Position of Instant_Order_Unit)
      • Set VariableSet Instant_Order_Point[1] = (Target point of issued order)
      • Unit - Make Instant_Order_Unit face (Angle from Instant_Order_Point[0] to Instant_Order_Point[1])
      • Custom script: call RemoveLocation( udg_Instant_Order_Point[0] )
      • Custom script: call RemoveLocation( udg_Instant_Order_Point[1] )
  • Instant Turn Order OBJECT
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Set VariableSet Instant_Order_Unit = (Triggering unit)
      • Set VariableSet Instant_Order_Point[0] = (Position of Instant_Order_Unit)
      • Set VariableSet Instant_Order_Point[1] = (Position of (Target unit of issued order))
      • Unit - Make Instant_Order_Unit face (Angle from Instant_Order_Point[0] to Instant_Order_Point[1])
      • Custom script: call RemoveLocation( udg_Instant_Order_Point[0] )
      • Custom script: call RemoveLocation( udg_Instant_Order_Point[1] )
Note that this hasn't been battle tested so there could be some issues here and there.
 

Attachments

  • Instant Turn Orders.w3m
    17.7 KB · Views: 6
Level 10
Joined
Dec 17, 2011
Messages
355
Oh wow!! To be honest I had slim hopes that there will be a solution but this actually works!!
I dont know how to express my gratitude! Thank you! 😭

Oh and something that is offtopic... I remember seeing your comment somewhere on autoattack resetting but I couldt find it now..
What is the current best method for AA resetting (like in LoL)?
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Maybe this?
 
Level 10
Joined
Dec 17, 2011
Messages
355
Maybe this?
Yes!! This indeed, thank you!
 
Top