Camera settings and key moving

Status
Not open for further replies.
Variables:
tempUnit as unit
tempPoint as point
tempPont2 as point


1) For the camera, play around with:
  • Camera - Set Camera Field (Timed)
And use Camera - Lock Camera Target To Unit to make the camera follow the selected unit automatically.

2) For the movement thingy try:
  • Forward
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
    • Actions
      • Set tempUnit = Peasant 0000 <gen>
      • Set tempPoint = (Position of tempUnit)
      • Set tempPoint2 = (tempPoint offset by 100.00 towards 90.00 degrees)
      • Unit - Order tempUnit to Move To tempPoint2
      • Custom script: call RemoveLocation( udg_tempPoint )
      • Custom script: call RemoveLocation( udg_tempPoint2 )
And for the rest of the arrow keys you've got to tweak the offsets (90.0 to 0.0/180.0/270.0 etc) yourself.
You might also want to Set tempUnit = Peasant 0000 <gen> in another trigger and not make it run every time you press an arrow key.
 
Last edited:
Status
Not open for further replies.
Back
Top