Staredit Network > Forums > SC2 Assistance > Topic: Moving Camera to Follow Unit
Moving Camera to Follow Unit
Jan 2 2013, 3:21 pm
By: InsolubleFluff  

Jan 2 2013, 3:21 pm InsolubleFluff Post #1



Hello guys, I am new to Triggering and SCII Mapping in general, I am looking for a way to make Camera X follow Unit Y, everywhere that Unit Y Moves.

Essentially, I want to make a Camera that is shot 'over the shoulder' of my Unit.



None.

Jan 2 2013, 5:36 pm luzz Post #2



I believe the "Make camera follow unit group" trigger is what you are looking for. Just make your unit a unit group (Variable would work best) and use that trigger, then all you need to do is set of the different angles of the camera and you are set.



None.

Jan 2 2013, 6:12 pm InsolubleFluff Post #3



I don't completely understand Unit Groups yet, what triggers am I looking for in order to set a unit group, and what kind of conditions or events are typical for creating unit groups, adding units to unit groups or removing units from unit groups?



None.

Jan 2 2013, 6:36 pm luzz Post #4



When you initialize the game, or create your "Hero" unit (Who will be your shooter which is what I am assuming you are making) simply add him to a global variable of type "Unit Group" using the "Add unit to unit group" trigger. Once that is done you can just use the "Follow unit group with camera" trigger to make that player's camera follow the unit group that has only one unit. This is the smoothest way to do it, you could just move the player's camera every game loop, but that makes it feel choppy and it doesn't seem right.

Conditions - Things that have to be true for the trigger/action to occur, in this case, you might want to make sure that it is the correct unit you are following (Like it is yours and not some other players) but other than that you probably wouldn't need any conditions

Events - Either map initialization (If you already have the unit you want to follow created), or when you create the hero unit is when you would want to add the unit to the "Unit Group" variable and then make the player's camera follow the unit group.

Hope I helped =/



None.

Jan 2 2013, 8:15 pm payne Post #5

:payne:

http://www.galaxywiki.net/Starter_Guide
This should help. ;)

Events define when a trigger is triggered.
Conditions are verified when Events are met. Conditions precise more conditions required for a trigger to be triggered. If Conditions are not met, the Actions will not be fired.
Actions contain everything that must be triggered when Events and Conditions are met.

Global Variables can be used everywhere and referenced everywhere. They are independent from triggers.
Local Variables are only used within the trigger they are called in. They are situated inside the trigger itself (in one of the sections like Events, Conditions and Actions inside the trigger). You can thus have multiple Local Variables of the same name in different triggers.

---

This tutorial will help you out on your quest:
http://www.galaxywiki.net/Custom_Camera_Setting_%28First_Person_and_Third_Person%29



None.

Jan 2 2013, 8:28 pm InsolubleFluff Post #6



Thanks guys, I will definitely try and look in to this and give it a try. And for the record, yes, I am trying to create a shooter ;) x



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:51 am]
Ultraviolet -- RIVE
RIVE shouted: Beta 4 lyfe, ya kno
feels like a lower commitment. like if someone bitches about something, I can say it's in beta phase whatchu expect? :P
[06:46 am]
RIVE -- Beta 4 lyfe, ya kno
[2023-9-28. : 5:26 am]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider I suppose that's one justification for pushing it to 1.00. I'm still messing with some novel concepts, I completely revamped the Shadowcraft hero in v0.18 and there's some kinks to work out with some of the other changes I made, but I suppose that doesn't mean I can't call the currently version 1.XX
indeed
[2023-9-28. : 1:13 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: Ultraviolet prediction: It will. ;)
:massimo:
[2023-9-28. : 1:13 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: Ultraviolet Oh, then your versioning is maybe a bit misleading. I didn't have much trust in a v0.2
I suppose that's one justification for pushing it to 1.00. I'm still messing with some novel concepts, I completely revamped the Shadowcraft hero in v0.18 and there's some kinks to work out with some of the other changes I made, but I suppose that doesn't mean I can't call the currently version 1.XX
[2023-9-28. : 1:12 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: Ultraviolet :lol: did you really just commit another shout just to add a bracket? :D
Damn straight! :P
[2023-9-27. : 7:22 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: Imp UV3 is actually in the works with some major changes, but it's been slow going. I'd like to have a version of Imp UV for every tileset at one point.. hopefully it doesn't take until 2030 :P
prediction: It will. ;)
[2023-9-27. : 7:21 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider Oh definitely fully playable. I used the first map as the shell, so it was basically complete from the first release. I've made some tweaks and improvements here and there based on nuances between the maps, like UV2 has more air units so certain ground-focused heroes like Psycho and Shadowcraft have needed some buffing. Other improvements have been little bug fixes or ways of stopping cheese strategies (like the bosses now spawn in a random location instead of at their lair so players can't just camp them with nukes. UV2 is definitely harder despite only being 4 levels + boss fight instead of 5. I'd say it's definitely worth a go, there's some unique mechanics that make each of the levels have kind of their own interesting spin
Oh, then your versioning is maybe a bit misleading. I didn't have much trust in a v0.2
[2023-9-27. : 7:21 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: nukes).* lol
:lol: did you really just commit another shout just to add a bracket? :D
[2023-9-27. : 4:22 pm]
ubtrueblue -- hello
Please log in to shout.


Members Online: Roy