Problem with Unit/Camera Rotation

UndeadDragon

Super Moderator
Reaction score
448
It has been a while since I have posted here for help, but I have been working on this for a long time today, but I just can't work out why it is not working.

Basically, I attached the camera rotation to the facing value of movingUnit. The movingUnit seems to not rotate, but it then rotates to 0 degrees. I have attached the map if you want to see what is wrong.

This is the trigger which rotates the movingUnit is

Trigger:
  • Lv 1 Move 3
    • Events
    • Conditions
    • Actions
      • Set hasMoved[3] = True
      • Set moveNumber = 3
      • Set tmpPoint = (Center of Movement 2 <gen>)
      • Unit - Order movingUnit to Attack-Move To tmpPoint
      • Custom script: call RemoveLocation( udg_tmpPoint )
      • Trigger - Run Movement Camera On <gen> (ignoring conditions)
      • Wait 2.50 seconds
      • Set tmpPoint = (Center of Movement 3 <gen>)
      • Unit - Order movingUnit to Attack-Move To tmpPoint
      • Custom script: call RemoveLocation( udg_tmpPoint )
      • Wait 4.00 seconds
      • Unit - Make movingUnit face 270.00 over 1.00 seconds
      • Trigger - Run Movement Camera Off <gen> (ignoring conditions)
      • Set tmpUGroup = (Units in creepChecking[moveNumber])
      • Unit Group - Order tmpUGroup to Attack movingUnit
      • Custom script: call DestroyGroup( udg_tmpUGroup )


This trigger works fine, which rotates the Unit.

Trigger:
  • Lv 1 Move 1
    • Events
    • Conditions
    • Actions
      • Unit - Unpause movingUnit
      • Unit - Unpause dummyUnit[1]
      • Unit - Unpause dummyUnit[2]
      • Set hasMoved[1] = True
      • Set tmpPoint = (Center of Movement 1 <gen>)
      • Unit - Order movingUnit to Attack-Move To tmpPoint
      • Trigger - Run Movement Camera On <gen> (ignoring conditions)
      • Custom script: call RemoveLocation( udg_tmpPoint )
      • Wait 5.00 seconds
      • Unit - Make movingUnit face 270.00 over 1.00 seconds
      • Trigger - Run Movement Camera Off <gen> (ignoring conditions)
      • Set tmpUGroup = (Units in creepChecking[moveNumber])
      • Unit Group - Order tmpUGroup to Attack movingUnit
      • Custom script: call DestroyGroup( udg_tmpUGroup )


It is run from another trigger, which works fine. (Below)

Trigger:
  • Movement Initialization
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • zombiesKilled Equal to neededKills[(Integer A)]
                  • hasMoved[(Integer A)] Equal to False
            • Then - Actions
              • Trigger - Run moveTriggers[(Integer A)] (ignoring conditions)
              • Set moveNumber = (Integer A)
            • Else - Actions


[del]Map attached if you want to see if it is because of something else.[/del] Removed. Fixed.
 

UndeadDragon

Super Moderator
Reaction score
448
BUMP. (Yes, I know I am a 2 hours early, but I am impatient :p)

EDIT: 2800 posts :)
 

xxxtrickyxxx

(o Y o)
Reaction score
64
well, i cant really figure out the way your making the unit move and camera but if you were talking about the third checkpoint not rotating toward the zombies, I changed the 270 to 0 and moved the zombie check region a bit so it was no longer overlapping movement 3 and it worked... kind of. before your guy reaches movement 3, he changes his facing mid walk so when he turns right on movement 3, its a bit off.
 

UndeadDragon

Super Moderator
Reaction score
448
Brillint. I didn't think about the regions over-lapping. I think it was because I picked all units in the creep-checking region, so the movingUnit was attempting to attack himself. +rep of course.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top