• 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.

Spinning Unit

Status
Not open for further replies.
Level 4
Joined
Dec 5, 2011
Messages
75
Sorry i know that this post may had been made thousands of times by other users but i still cant see what is wrong with my trigger.. the unit is spinning very slowly like
half spin in 1 second
I already tried to edit Turning Rate of my unit but still the same..
Thanks in advance!
  • START TORNADO
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Tornado
    • Actions
      • Set LastUnit = (Casting unit)
      • Trigger - Turn on TURNING <gen>
      • Wait 1.00 seconds
      • Trigger - Turn off TURNING <gen>
  • TURNING
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set TurningAngle = (Facing of LastUnit)
      • Set TurningAngle = (TurningAngle + 10.00)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TurningAngle Greater than (>) 360.00
          • Then - Actions
            • Set TurningAngle = (TurningAngle - 360.00)
          • Else - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TurningAngle Less than (<) 0.00
          • Then - Actions
            • Set TurningAngle = (TurningAngle + 360.00)
          • Else - Actions
      • Unit - Make LastUnit face TurningAngle over 0.03 seconds
 
Last edited:
Level 5
Joined
Jun 16, 2004
Messages
108
Firstly, you do not need to handle the >360 and <0 cases yourself, Warcraft 3 handles them fine.

Second, turning in Warcraft 3 is just slower than you would want sometimes. There is a limit to how fast you can turn things, as far as I know it is hard-coded into the engine. You might as well set it to turn over 0 seconds instead of .03 just for the chance that it will turn a little bit faster, but this will not allow you to bypass the turning limitation.

One possible solutions include removing and recreating the unit you want over and over again with the desired angle, this may allow you to "spin" faster than normally allowed. This probably is only viable for a limited number of effects with limited animation though.

Another possible solution would be to modify the model in something like mdlvis and rename the "origin" bone to "chest" or something like that. I am actually not sure which bone should be renamed to chest, been a while (the post below me suggests that it is the root bone that should be renamed). I have done something similar for some models to smoothly change a unit's Z angle. If you do this, then use the bone facing lock function:
  • Animation - Lock (Triggering unit)'s Chest to face (Picked unit), offset by (0.00, 0.00, 90.00)
(with the appropriate unit values of course)
You might be able to spin the locked unit faster than normally allowed, via locking the facing to a unit which you rapidly move in circles around the unit that should be turning.

Yet another solution would be to create a spin animation of the desired speed yourself, if you can be bothered to edit the model as above then doing this might be simpler. The blade master has a spin animation for example. Making this sort of animation might be really easy with minimal learning required, not sure myself.
 
Last edited:
Level 7
Joined
Oct 16, 2010
Messages
194
If your question is why is my turning rate slow, then maybe Change your turning angle to
  • Set TurningAngle = (TurningAngle + 30.00)

If that does not work maybe post a demo map here.

Edit: NVM forget what i said. Maybe Halo is right.
 
Last edited:
Level 4
Joined
Dec 5, 2011
Messages
75
Thanks guys for the answer i guess i will follow purge suggestion, topic closed!
 
Status
Not open for further replies.
Top