3rd Person Camera Help - How to Reset Camera?

Lord

TH.net Regular
Everyone needs help sometimes, and I'm a Unit of Group - Everyone. Well, my problem is this:

Code:
Periodic Adjustment
    Events
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set NumUnitsSelected = (Number of units in (Units owned by (Picked player) matching (((Matching unit) is selected by (Picked player)) Equal to True)))
                Game - Display to (All players) for 1.00 seconds the text: (numselected:  + (String(NumUnitsSelected)))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        NumUnitsSelected Equal to 1
                    Then - Actions
                        Set CameraTarget = (Random unit from (Units owned by (Picked player) matching (((Matching unit) is selected by (Picked player)) Equal to True)))
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        CameraTarget Equal to No unit
                    Then - Actions
                        Skip remaining actions
                    Else - Actions
                Camera - Pan camera for (Picked player) to (Position of CameraTarget) over 1.00 seconds
                Camera - Lock camera target for (Picked player) to CameraTarget, offset by (0.00, 0.00) using Default rotation
                Camera - Set (Picked player)'s camera Distance to target to 1100.00 over 0.75 seconds
                Camera - Set (Picked player)'s camera Angle of attack to -20.00 over 0.75 seconds
                Camera - Set (Picked player)'s camera Rotation to (Facing of CameraTarget) over 0.75 seconds
        Wait 0.50 seconds
        Trigger - Run (This trigger) (checking conditions)
As you can see, it's Darg's 3rd person cam trig. A very short, simple and (I hope) leakless system. It works cool in game, but it has a small defect. We start the game in normal cam view. If I select a unit, the camera will switch into a 3rd cam view. It's cool, but what if I wanna reset my cammie to normal mode? I tell ya. Nothing. So lets get to the point, I need a trig which makes the camera reset if I deselect my currently selected unit. It would be very important for me to make this, so if you can please help (+rep for HeLpAs). Thanks in advance!

Lord
 
Code:
Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds
That maybe? :p
 

Lord

TH.net Regular
Buddy

It's cool, but what if I wanna reset my cammie to normal mode? I tell ya. Nothing.
This system won't allow me to do that. It forces the camera to stay in 3rd view. I can use that trig, but nothing will happen. Already tried.
 

Lord

TH.net Regular
I use this:

Code:
des
    Events
        Player - Player 1 (Red) types a chat message containing -des as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                Selection - Remove (Picked unit) from selection for Player 1 (Red)
                Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds
                Camera - Stop the camera for Player 1 (Red)
 

Chocobo

White-Flower
Code:
Periodic Adjustment
    Events
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        boolean[(Player number of (Picked Player))] Equal to True
                    Then - Actions
                        [COLOR="Red"]//no actions[/COLOR]
                    Else - Actions
                Set NumUnitsSelected = (Number of units in (Units owned by (Picked player) matching (((Matching unit) is selected by (Picked player)) Equal to True)))
                Game - Display to (All players) for 1.00 seconds the text: (numselected:  + (String(NumUnitsSelected)))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        NumUnitsSelected Equal to 1
                    Then - Actions
                        Set CameraTarget = (Random unit from (Units owned by (Picked player) matching (((Matching unit) is selected by (Picked player)) Equal to True)))
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        CameraTarget Equal to No unit
                    Then - Actions
                        Skip remaining actions
                    Else - Actions
                Camera - Pan camera for (Picked player) to (Position of CameraTarget) over 1.00 seconds
                Camera - Lock camera target for (Picked player) to CameraTarget, offset by (0.00, 0.00) using Default rotation
                Camera - Set (Picked player)'s camera Distance to target to 1100.00 over 0.75 seconds
                Camera - Set (Picked player)'s camera Angle of attack to -20.00 over 0.75 seconds
                Camera - Set (Picked player)'s camera Rotation to (Facing of CameraTarget) over 0.75 seconds
        Wait 0.50 seconds
        Trigger - Run (This trigger) (checking conditions)
Code:
des
    Events
        Player - Player 1 (Red) types a chat message containing -des as An exact match
        Player - Player 2 (Blue) types a chat message containing -des as An exact match
        Player - Player 3 (Teal) types a chat message containing -des as An exact match
    Conditions
    Actions
        Set boolean[(Player number of (Triggering player))] = True
        Custom script:   set bj_wantDestroyGroup=true
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                Selection - Remove (Picked unit) from selection for (Triggering player)
                Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
Code:
undes
    Events
        Player - Player 1 (Red) types a chat message containing -undes as An exact match
        Player - Player 2 (Blue) types a chat message containing -undes as An exact match
        Player - Player 3 (Teal) types a chat message containing -undes as An exact match
    Conditions
    Actions
        Set boolean[(Player number of (Triggering player))] = False
 

Lord

TH.net Regular
Ehh thanks Chocobo, but you misunderstood me.

Code:
Player - Player 1 (Red) types a chat message containing -des as An exact match
I don't want this to be the event. It's just a test thing for me to see what happens if I deselect a unit. I want to make it so if I deselect the unit the camera stops following it and resets to nomal view. Using a "Player deselects a unit"-like event.


Überplayer. I can't disable it coz I want it to work for all players in game. It's not for a single player map.
 

Rheias

New Helper (I got over 2000 posts)
Alrighty, just follow this:

Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set Group = (Units currently selected by (Player((Integer A))))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in Group) Not equal to 0
                    Then - Actions
                        // Your actions
                    Else - Actions
                Custom script:   call DestroyGroup(udg_Group)
 

Rheias

New Helper (I got over 2000 posts)
My bad:

Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set Group = (Units currently selected by ([B]Picked player[/B]))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in Group) Not equal to 0
                    Then - Actions
                        // Your actions
                    Else - Actions
                Custom script:   call DestroyGroup(udg_Group)
 

Lord

TH.net Regular
Something isn't good. Here are the trigs I have now:

Code:
Periodic Adjustment
    Events
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set NumUnitsSelected = (Number of units in (Units owned by (Picked player) matching (((Matching unit) is selected by (Picked player)) Equal to True)))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        NumUnitsSelected Equal to 1
                    Then - Actions
                        Set CameraTarget = (Random unit from (Units owned by (Picked player) matching (((Matching unit) is selected by (Picked player)) Equal to True)))
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        CameraTarget Equal to No unit
                    Then - Actions
                        Skip remaining actions
                    Else - Actions
                Camera - Pan camera for (Picked player) to (Position of CameraTarget) over 1.00 seconds
                Camera - Lock camera target for (Picked player) to CameraTarget, offset by (0.00, 0.00) using Default rotation
                Camera - Set (Picked player)'s camera Distance to target to 700.00 over 1.00 seconds
                Camera - Set (Picked player)'s camera Angle of attack to -20.00 over 1.00 seconds
                Camera - Set (Picked player)'s camera Rotation to (Facing of CameraTarget) over 1.00 seconds
        Wait 0.50 seconds
        Trigger - Run (This trigger) (checking conditions)
Code:
Deselection
    Events
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set Group = (Units currently selected by (Picked player))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in Group) Not equal to 0
                    Then - Actions
                        Camera - Reset camera for (Picked player) to standard game-view over 0.00 seconds
                    Else - Actions
                        Custom script:   call DestroyGroup(udg_Group)
The problem is with the camera again. If I deselect it still remains locked on the last controlled unit.
 

Guest3z

New Member
Code:
If - Conditions
     CameraTarget Equal to No unit
Then - Actions
     Skip remaining actions
Did you ever set CameraTarget to no unit? Cuz if not won't it just keep repeating?
 

Lord

TH.net Regular
Thx for the help buddies, but I've found an easier way to do things. +rep for all who helped!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    it is all percolating man
  • The Helper The Helper:
    TheHelper.net #1!
  • Wizard Wizard:
    #1
  • The Helper The Helper:
    LOL I love this place
  • Wizard Wizard:
    ;D
  • Wizard Wizard:
    We all do.
  • O Old Mountain Shadow:
    So what is next for thehelper.net? Is there a new set goals yet?
  • The Helper The Helper:
    yes we are going to be expanding
    +1
  • The Helper The Helper:
    help more people
  • The Helper The Helper:
    thank you for asking Old Mountain Shadow hell ya@
  • The Helper The Helper:
    Look at Mountain Shadow in the chat!
  • The Helper The Helper:
    welcome to thehelper.net
  • O Old Mountain Shadow:
    thanks although I'm really kind of regretting this name lol ... is there a way to change it out or will I need to make a new account?
    +1
  • Wizard Wizard:
    One of us can change it for you, I believe. Just send me a PM on what you want.
  • Ghan Ghan:
    Some day we should get the feature where you can change your own name.
  • Wizard Wizard:
    Soon!
  • The Helper The Helper:
    did the mountain shadow get his name changed? personally I think Old Mountain Shadow is a kickass name
  • The Helper The Helper:
    but what do i know lol
  • Wizard Wizard:
    No they haven't had their name changed, it is badass xD
    +1
  • O Old Mountain Shadow:
    Thanks, lol! I haven't quite come up with a good new one yet. I was gonna default to one of my older usernames: Cha Zui = tea drunk in Chinese but then decided it too didn't quite fit right. I'm not asian lol... But I am tall, and old spirited which is sort of where the Old Mountain Shadow came about.
  • O Old Mountain Shadow:
    Either way I appreciate the willingness to help me change it! Should I discover something better I'll swap it, but for now ill stay with what I got.
  • The Helper The Helper:
    If you want a change like they said earlier just let us know
    +1
  • Ghan Ghan:
    Patched and rebooted the server this morning.
  • Ghan Ghan:
  • The Helper The Helper:
    dam pwnkit what a name probably perfectly describes it

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top