• 🏆 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] Unit Fast Rotation

Status
Not open for further replies.
Level 2
Joined
Nov 4, 2017
Messages
8
As the title says, how do i rotate a unit so fast. somehow if i add more speed to the angle it does not look good.

Here's my Triggers:

  • Raid Start
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Set RAID_key = (Custom value of HERO_active_unit[(Integer A)])
          • Set RAID_unit[RAID_key] = HERO_active_unit[(Integer A)]
          • Set GTS_TimeOut = 0.03
          • Set GTS_Trigger = Raid Loop <gen>
          • Trigger - Run GTS Main <gen> (checking conditions)
          • Hashtable - Save Handle OfRAID_unit[RAID_key] as 0 of GTS_CustomValue in GTS_Hashtable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Hashtable - Save -120.00 as 1 of GTS_CustomValue in GTS_Hashtable
            • Else - Actions
              • Hashtable - Save 120.00 as 1 of GTS_CustomValue in GTS_Hashtable
  • Raid Loop
    • Events
    • Conditions
    • Actions
      • Set tempunit = (Load 0 of GTS_CustomValue in GTS_Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GTS_ExecutionCounter Greater than or equal to 100
        • Then - Actions
          • Hashtable - Clear all child hashtables of child (Key (Load 0 of GTS_CustomValue in GTS_Hashtable)) in (Last created hashtable)
          • Set GTS_DestroyTimer = True
        • Else - Actions
          • Set temppoint[0] = (Position of tempunit)
          • Unit - Move tempunit instantly to temppoint[0], facing ((Facing of tempunit) + (Load 1 of GTS_CustomValue from GTS_Hashtable)) degrees
          • Custom script: call RemoveLocation(udg_temppoint[0])
 
Level 3
Joined
Oct 1, 2018
Messages
63
U are using move unit facing instandly, what i find is good.
the rotation time of 0.03 seconds is very fast. I dont know if it can be faster if you go 002 or 001.

But the angle of 120 is a bit to much for periodic 00,3 Seconds.
The unit turns half araound by 180. So 120 doesnt look good at this highspeed, becouse you are also using move-instantly. U dont see how it turns, becouse it is instant!

Start with 3 degrees and increase it step by step testing the cinematic, until it is fast enough for you.
 
Level 2
Joined
Nov 4, 2017
Messages
8
@Donnerkoettel Thanks for the reply dude but i already found whats causing it to limit the speed or rate of rotating. Its in the object editor i though lowering the turn rate will make it fast i dunno what wrong with me silly me i just need to increase it. i thought that the function move unit facing instantly will cause the unit to move instantly and face a certain angle also instantly but its not only the move is instant. hehe thanks btw.
 
Status
Not open for further replies.
Top