System Third Person View (Another)

Squishy

You can change this now in User CP.
Reaction score
127
After seeing some of other Third Person Cameras, I wanted to make my own. So here it is.

Features:
- The Up and Down arrow keys adjust the Angle of Attack
- The Left and Right arrow keys adjust the Rotation
- The Camera snaps back to normal and releasing the Left or Right Arrow key
- The mouse wheel adjusts the zoom
- The Escape Key toggles the Third Person Camera on/off

Pros:
- Easily adjustable in-game
- No text commands

Cons:
- Inefficient (It's in GUI)
- High Terrain causes problems

Triggers:
Code:
Camera Initalization
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 16, do (Actions)
            Loop - Actions
                Trigger - Add to Set Camera Unit <gen> the event (Player - (Player((Integer A))) Selects a unit)
                Trigger - Add to Toggle Camera <gen> the event (Player - (Player((Integer A))) skips a cinematic sequence)
                Trigger - Add to Left Pressed <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key)
                Trigger - Add to Right Pressed <gen> the event (Player - (Player((Integer A))) Presses the Right Arrow key)
                Trigger - Add to Down Pressed <gen> the event (Player - (Player((Integer A))) Presses the Down Arrow key)
                Trigger - Add to Up Pressed <gen> the event (Player - (Player((Integer A))) Presses the Up Arrow key)
                Trigger - Add to Left Released <gen> the event (Player - (Player((Integer A))) Releases the Left Arrow key)
                Trigger - Add to Right Released <gen> the event (Player - (Player((Integer A))) Releases the Right Arrow key)
                Trigger - Add to Down Released <gen> the event (Player - (Player((Integer A))) Releases the Down Arrow key)
                Trigger - Add to Up Released <gen> the event (Player - (Player((Integer A))) Releases the Up Arrow key)
Code:
Set Camera Unit
    Events
    Conditions
    Actions
        Set Camera_Unit[(Player number of (Triggering player))] = (Triggering unit)
Code:
Toggle Camera
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Camera_On[(Player number of (Triggering player))] Equal to True
            Then - Actions
                Set Camera_On[(Player number of (Triggering player))] = False
                Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
            Else - Actions
                Set Camera_On[(Player number of (Triggering player))] = True
                Set Camera_Rotation[(Player number of (Triggering player))] = 90.00
Code:
Change Camera
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 16, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Camera_On[(Integer A)] Equal to True
                    Then - Actions
                        Set Temp_Point = (Position of Camera_Unit[(Integer A)])
                        Camera - Pan camera for (Owner of Camera_Unit[(Integer A)]) to Temp_Point over 0.00 seconds
                        Camera - Rotate camera ((Facing of Camera_Unit[(Integer A)]) - Camera_Rotation[(Integer A)]) degrees around Temp_Point for (Owner of Camera_Unit[(Integer A)]) over 0.00 seconds
                        Camera - Set (Owner of Camera_Unit[(Integer A)])'s camera Angle of attack to Camera_AoA[(Integer A)] over 0.00 seconds
                        Custom script:   call RemoveLocation (udg_Temp_Point)
                    Else - Actions
Code:
Modify Rotation
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 16, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Camera_On[(Integer A)] Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Left_Pressed[(Integer A)] Equal to True
                                Right_Pressed[(Integer A)] Equal to False
                            Then - Actions
                                Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] + 3.00)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Camera_Rotation[(Integer A)] Greater than 269.00
                                    Then - Actions
                                        Set Camera_Rotation[(Integer A)] = -90.00
                                    Else - Actions
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Right_Pressed[(Integer A)] Equal to True
                                Left_Pressed[(Integer A)] Equal to False
                            Then - Actions
                                Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] - 3.00)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Camera_Rotation[(Integer A)] Less than -89.00
                                    Then - Actions
                                        Set Camera_Rotation[(Integer A)] = 270.00
                                    Else - Actions
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Right_Pressed[(Integer A)] Equal to False
                                Left_Pressed[(Integer A)] Equal to False
                                Camera_Rotation[(Integer A)] Not equal to 90.00
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Camera_Rotation[(Integer A)] Greater than 84.00
                                        Camera_Rotation[(Integer A)] Less than 96.00
                                    Then - Actions
                                        Set Camera_Rotation[(Integer A)] = 90.00
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Camera_Rotation[(Integer A)] Greater than 90.00
                                            Then - Actions
                                                Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] - 6.00)
                                            Else - Actions
                                                Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] + 6.00)
                            Else - Actions
                    Else - Actions
Code:
Modify AoA
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 16, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Camera_On[(Integer A)] Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Up_Pressed[(Integer A)] Equal to True
                                Down_Pressed[(Integer A)] Equal to False
                                Camera_AoA[(Integer A)] Greater than -80.00
                            Then - Actions
                                Set Camera_AoA[(Integer A)] = (Camera_AoA[(Integer A)] - 1.50)
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Up_Pressed[(Integer A)] Equal to False
                                Down_Pressed[(Integer A)] Equal to True
                                Camera_AoA[(Integer A)] Less than -10.00
                            Then - Actions
                                Set Camera_AoA[(Integer A)] = (Camera_AoA[(Integer A)] + 1.50)
                            Else - Actions
                    Else - Actions
Code:
Left Pressed
    Events
    Conditions
    Actions
        Set Left_Pressed[(Player number of (Triggering player))] = True
Code:
Right Pressed
    Events
    Conditions
    Actions
        Set Right_Pressed[(Player number of (Triggering player))] = True
Code:
Down Pressed
    Events
    Conditions
    Actions
        Set Down_Pressed[(Player number of (Triggering player))] = True
Code:
Up Pressed
    Events
    Conditions
    Actions
        Set Up_Pressed[(Player number of (Triggering player))] = True
Code:
Left Released
    Events
    Conditions
    Actions
        Set Left_Pressed[(Player number of (Triggering player))] = False
Code:
Right Released
    Events
    Conditions
    Actions
        Set Right_Pressed[(Player number of (Triggering player))] = False
Code:
Down Released
    Events
    Conditions
    Actions
        Set Down_Pressed[(Player number of (Triggering player))] = False
Code:
Up Released
    Events
    Conditions
    Actions
        Set Up_Pressed[(Player number of (Triggering player))] = False
 

Attachments

  • Third Person View.w3x
    21.3 KB · Views: 344

XxShadyxX

I abused the rep system.
Reaction score
81
Good system different from all the others. looks well done. Haven't tested it yet but does it have to snap back to normal? it will seem kinda annoying? Maybe I guess depends on what other people like.

Anyway really good well dont system. +rep
Also you should make a JASS version if you can :)
 

Squishy

You can change this now in User CP.
Reaction score
127
Thanks for the +rep :).The camera doesn't have to snap back to normal, you could take that out if you modified the code. I prefer it snapping back to normal, because I find it annoying when you rotate the camera to the side, and your stuck looking at the unit from the side until you move the camera back. I would make a JASS version, but I still haven't gotten around to learning it.
 

Leazy

You can change this now in User CP.
Reaction score
50
This is the best third person camera I ever tested :)

+rep
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
"Made in gui" choice your side but it can't be in cons and pros :p
Honestly it's really inefficient.
Test it with 12 players and cry.

Not really your fault but gui is so far poorly coded for short periodic like that.
 

Squishy

You can change this now in User CP.
Reaction score
127
Ok, I modified the first post. And when I get around to learning JASS, I'll write a JASS version if anyone would find it useful.
 

Kazuga

Let the game begin...
Reaction score
110
Add screenies? Also a small question, does it follow the unit's height for example if you walk up on a mountain?
 

Squishy

You can change this now in User CP.
Reaction score
127
I'm on vacation right now, so I can't do anything Warcraft related right now. When I get back, I'll add some screenies and submit an updated version.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Don't know for the "invented" part, but, either way, my personal recommendation would go to a JASS based system.
If nothing else, it's extremely easy to import, and it has no problems with 12 players or terrain height.


As for approving this:
- has anyone actually tested it?
- does it work with non-flat terrain?
- is it still usable with 12 players?
- any settings I can change? Like distance, default angle, ...
- why does it include the Neutrals?
 

Viikuna

No Marlo no game.
Reaction score
265
Don't know for the "invented" part
Well, neither do I, I jus repeated what he said. I just felt like posting that, because that function is best I have ever seen. ( I too had problems with Terrain Z height and Camera Z , before I found that awesome function. )
 

nemesispoi

New Member
Reaction score
5
how do you get the camera right up behind the unit because this one is farther away from teh unit
 

Joker(Div)

Always Here..
Reaction score
86
Let me put it into real-life terms. Say there was a car that had 30 mpg. Then someone else designs an almost identical car that has 20 mpg. Why would you take the 20 mpg when theres a car thats almost the same with 30?
 

Wolfchant666

New Member
Reaction score
0
Well, i tried to import the Third Camera View for my Scenario, and everything worked so far, but:
I can't activate multiple functions after importing it.
For example in "Change Camera" the trigger
"Camera - Set(owner of Camera_Unit[(Integer A)])'s camera perspective to Camera_AoA[(Integer A)] over 0.00 seconds"
It's just outputting the message "The function can't be activated"
Hope somebody can help me

Wolfchant
 

Lupo

New Member
Reaction score
0
Yeah, I have no idea how to get this to work either. Almost all the triggers have say they cant be activated, I made the variables exactly the same on my map and that helped with a few of them, but I don't know what to do with the rest of the triggers. Im super new to this is pretty much my problem. Any help would be awesome.

Thanks!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top