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

Camera settings and key moving

Status
Not open for further replies.
Level 5
Joined
May 21, 2006
Messages
174
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.
Top