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.
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[03:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[12:51 am]
Oh_Man -- definitely EUD
[09:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[09:35 pm]
Vrael -- that is insane
[09:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: lil-Inferno, jjf28, Roy