Local variables:
Best way = most efficient attempt with least lag
following = always keeping the target centered in the screen
What is the (best way) to run a top-down camera always (following) a unit?
PS. i need this to run for up to 4 players.
None.
Best to use a global variable to be honest.
Top down view:
Camera - Apply camera object Angle of Attack 90.0 for Player 1 over 0.0 seconds with existing Velocity% and 10% deceleration.
Camera - Lock Camera Input
Then for the following you can either use:
Every 1.0 game seconds
Camera - Pan the camera for player 1 to (Position of Unit) over 0.5 seconds with existing velocity% and 10% deceleation
Or
Camera - Make camera look at and follow Unit.
Edit: The 90.0 angle of attack is 100% top down, tbh 75 or 80 looks better IMO.
None.
Best to use a global variable to be honest.
For my post or for my trigger? lolz
Or
Camera - Make camera look at and follow Unit.
This wouldn't pan the camera, just make the camera look at target but not move the eye
Edit: And i tried your first method as following:
Camera - Pan the camera for player (Owner of (Last created unit)) to (Position of (Last created unit)) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Apply camera object Angle Of Attack 90.0 for player 1 over 0.0 seconds with Existing Velocity% initial velocity and 10% deceleration
Camera - Lock camera input for player (Owner of (Last created unit))
Camera - Make the camera look at and follow (Last created unit) for player (Owner of (Last created unit))And whenever you move the unit, the camera glitches out like it's rendering 2 cameras at the same time
Post has been edited 1 time(s), last time on May 19 2011, 2:36 am by Bolshevik09.
None.
An artist's depiction of an Extended Unit Death
Camera - Pan the camera for player (Owner of (Last created unit)) to (Position of (Last created unit)) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Apply camera object Angle Of Attack 90.0 for player 1 over 0.0 seconds with Existing Velocity% initial velocity and 10% deceleration
Camera - Lock camera input for player (Owner of (Last created unit))
Camera - Make the camera look at and follow (Last created unit) for player (Owner of (Last created unit))
You should only apply the pan periodically, and consider panning over the period of time you're using for the periodic event (i.e. if the periodic event is 1.0 seconds, pan over 1.0 seconds).
The second two actions are for initially setting up the view and need only be applied once.
The fourth action should not be used since that is not the effect you want.
Yeah sorry I didn't make that clear.
Run the Lock Camera and Apply Angle of Attack in your initialisation of the map.
Then once initialisation is complete, enable a trigger which runs periodically as Roy suggested.
Good luck wit yo map tho, good to see more people getting into SC2.
Edit: I wasn't sure about the make camera look at and follow trigger - just thought I'd include it as a possibility
None.
This is what i ended up using: Local Variables
P1 unit = No Point <Point>
Actions
General - Repeat (Actions) forever
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If (Status of player 1) == Left The Game
Then General - Skip remaining actions Camera - Pan the camera for player 1 to (Position of Player's Unit[1]) over 0.4 seconds...
Variable - Set P1 unit = (Position of Player's Unit[1])
General - Wait for (Conditions), checking every 0.3 Game Time seconds
Not Conditions
(Position of Player's Unit[1]) == P1 unitThis loop runs when the unit moves, then stores his current point, repeats.
Post has been edited 2 time(s), last time on May 19 2011, 2:02 pm by Bolshevik09.
None.