Staredit Network > Forums > SC2 Assistance > Topic: Top down camera
Top down camera
May 19 2011, 1:58 am
By: Bolshevik09  

May 19 2011, 1:58 am Bolshevik09 Post #1



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.

May 19 2011, 2:13 am NicholasBeige Post #2



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.

May 19 2011, 2:29 am Bolshevik09 Post #3



Quote from name:Cardinal
Best to use a global variable to be honest.
For my post or for my trigger? lolz
Quote from name:Cardinal
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.

May 19 2011, 3:11 am Roy Post #4

An artist's depiction of an Extended Unit Death

Quote from Bolshevik09
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.




May 19 2011, 3:22 am NicholasBeige Post #5



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.

May 19 2011, 4:17 am Bolshevik09 Post #6



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 unit


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

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:41 pm]
Ultraviolet -- just sent you a message on Discord. I suspect you're probably trying to change unit speeds for units that don't use flingy.dat for movement (like any units that walk instead of hovering/flying). You can change their movement to flingy, but they unfortunately look more like they're gliding than walking when you do that.
[07:31 pm]
Symmetry -- EE2, I've been using setdatfile successfully for units.dat and weapons.dat but the flingy changes don't seem to happen
[05:25 pm]
Ultraviolet -- in EE2 you just open DatEdit, go to the flingy tab, and make whatever changes you want. Though if you want to do dynamic shit, you have to use the trigger editor with the setdatfile action. And of course you have to inject your changes when done. Can give more specific troubleshooting advice if you provide more details
[05:20 pm]
Ultraviolet -- Symmetry
Symmetry shouted: why can't I seem to make eud editor change flingy.dat D:
Are you using EE2 or EE3?
[04:57 pm]
Symmetry -- wdym
[02:24 pm]
Apos -- :wob:
[04:16 am]
NudeRaider -- files in c:\program files\ are protected
[2026-7-11. : 8:11 pm]
Symmetry -- why can't I seem to make eud editor change flingy.dat D:
[2026-7-11. : 4:33 pm]
Ultraviolet -- :wob:
[2026-7-10. : 11:00 pm]
Vrael -- :wob:
Please log in to shout.


Members Online: O)FaRTy1billion[MM], lil-Inferno, Symmetry