I've locked the camera to a unit; but I can't unlock now!

AlicanC

New Member
Reaction score
2
In my map if a player enters "-camera 1" this trigger gets enabled:
Code:
Camera Copy
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        -------- Third-Person camera --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Last_Camera Equal to 1
            Then - Actions
                Set Last_UnitGroup = (Units owned by Last_Player matching (((Matching unit) is selected by Last_Player) Equal to True))
                Set Last_Integer = (Number of units in Last_UnitGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Last_Integer Equal to 1
                    Then - Actions
                        Set Last_Unit = (Random unit from Last_UnitGroup)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Hero_Picked[(Player number of Last_Player)] Equal to True
                                Hero_Alive[(Player number of Last_Player)] Equal to True
                            Then - Actions
                                Set Last_Unit = Hero[(Player number of Last_Player)]
                            Else - Actions
                                Skip remaining actions
                Camera - Pan camera for Last_Player to (Position of Last_Unit) over 1.00 seconds
                Camera - Lock camera target for Last_Player to Last_Unit, offset by (0.00, 0.00) using Default rotation
                Camera - Set Last_Player's camera Distance to target to 1100.00 over 0.75 seconds
                Camera - Set Last_Player's camera Angle of attack to -20.00 over 0.75 seconds
                Camera - Set Last_Player's camera Rotation to (Facing of Last_Unit) over 0.75 seconds
            Else - Actions
                Do nothing
This works perfect; but now I want to make a command "-camera normal" to teke the camera back to normal; but this doesn't work:
Code:
Camera Copy
    Events
        Blah blah
    Conditions
    Actions
        Camera - Pan camera for Last_Player to (Position of Last_Unit) over 1.00 seconds
        Camera - Lock camera target for Last_Player to Last_Unit, offset by (0.00, 0.00) using Default rotation
        Camera - Set Last_Player's camera Distance to target to 1100.00 over 0.75 seconds
        Camera - Set Last_Player's camera Angle of attack to -20.00 over 0.75 seconds
        Camera - Set Last_Player's camera Rotation to (Facing of Last_Unit) over 0.75 seconds

What now!?!?
 

Korolen

New User (Why do I keep getting those red bars?)
Reaction score
69
You will want to use Camera - Reset to Game Camera. Also, you will need to disable the other trigger when the camera control is normal.

BTW, 0.01 is pretty frequent. 0.02 or 0.03 should be fine.
 

AlicanC

New Member
Reaction score
2
Thanks for help. I did the same thing; but my trigger kept reseting camera every 0.01 second :)
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
If the camera is locked you can also type "CTRL + C" ...or was it CTRL+V?..hmm, think it was C :D
(just wanted you to know, in case you didnt)
Cheerio
 

ertaboy356b

Old School Gamer
Reaction score
86
Hmmm, maybe if you rewrite your trigger like this it should work, not sure though:

1. Make an empty PlayerGroup, lets name it, CameraGroup
2. Make a trigger that when the player enters "- camera 1", that player is added into CameraGroup.
3. Make a trigger with periodic event(for camera locking purposes) that will pan the camera to every player on CameraGroup.
4. Make a trigger that when a player enters "- camera normal", that player is removed from CameraGroup.

So you have 3 triggers, The one who sets who will be locked, the one who locks, and the one who sets who will be removed from the locked..

:)
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
instead of writing something... just use an ability instead.. 1000times better.
personally, i really hate maps where u have to type in things, to get things to work. Example
-withdraw , -camlock, -go, ........ ;)
So, ye, put an ability instead on your unit, i doubt u got 6 abilities on it... ;)
If u do got 6 abils, well, change the stop button, to an ability "lock cam" and change its icon..? Since stop button (using hold pos instead)= rarely used.. i mean NEVER!... When "unit issued order stop" > do actions... :rolleyes: :confused:
Cheerio
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
@manytimes, can you change the "stop" icon just through the Interface menu? (just curious)
 

AlicanC

New Member
Reaction score
2
Hmmm, maybe if you rewrite your trigger like this it should work, not sure though:

1. Make an empty PlayerGroup, lets name it, CameraGroup
2. Make a trigger that when the player enters "- camera 1", that player is added into CameraGroup.
3. Make a trigger with periodic event(for camera locking purposes) that will pan the camera to every player on CameraGroup.
4. Make a trigger that when a player enters "- camera normal", that player is removed from CameraGroup.

So you have 3 triggers, The one who sets who will be locked, the one who locks, and the one who sets who will be removed from the locked..

:)
I solved it already.

Setting camera modes:
Code:
camera normal
    Events
        Player - Player 1 (Red) types a chat message containing -camera -normal as An exact match
        Player - Player 2 (Blue) types a chat message containing -camera -normal as An exact match
        Player - Player 5 (Yellow) types a chat message containing -camera -normal as An exact match
        Player - Player 7 (Green) types a chat message containing -camera -normal as An exact match
    Conditions
    Actions
        Set Last_Player = (Triggering player)
        Set Camera[(Player number of Last_Player)] = 0
        Camera - Reset camera for Last_Player to standard game-view over 0.00 seconds
        Game - Display to (Player group(Last_Player)) for 5.00 seconds the text: |cffff3300!Message|...
Code:
camera thirdperson
    Events
        Player - Player 1 (Red) types a chat message containing -camera -thirdperson as An exact match
        Player - Player 2 (Blue) types a chat message containing -camera -thirdperson as An exact match
        Player - Player 5 (Yellow) types a chat message containing -camera -thirdperson as An exact match
        Player - Player 7 (Green) types a chat message containing -camera -thirdperson as An exact match
    Conditions
    Actions
        Set Last_Player = (Triggering player)
        Set Camera[(Player number of Last_Player)] = 1
        Game - Display to (Player group(Last_Player)) for 5.00 seconds the text: |cffff3300!Message|...
Camera Trigger:
Code:
Camera
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set Last_Player = (Picked player)
                Set Last_Camera = Camera[(Player number of Last_Player)]
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Last_Player slot status) Equal to Is playing
                    Then - Actions
                        -------- Normal camera --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Last_Camera Equal to 0
                            Then - Actions
                                Skip remaining actions
                            Else - Actions
                                Do nothing
                        -------- Third-Person camera --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Last_Camera Equal to 1
                            Then - Actions
                                Set Last_UnitGroup = (Units owned by Last_Player matching (((Matching unit) is selected by Last_Player) Equal to True))
                                Set Last_Integer = (Number of units in Last_UnitGroup)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Last_Integer Equal to 1
                                    Then - Actions
                                        Set Last_Unit = (Random unit from Last_UnitGroup)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Hero_Picked[(Player number of Last_Player)] Equal to True
                                                Hero_Alive[(Player number of Last_Player)] Equal to True
                                            Then - Actions
                                                Set Last_Unit = Hero[(Player number of Last_Player)]
                                            Else - Actions
                                                Skip remaining actions
                                Camera - Pan camera for Last_Player to (Position of Last_Unit) over 1.00 seconds
                                Camera - Lock camera target for Last_Player to Last_Unit, offset by (0.00, 0.00) using Default rotation
                                Camera - Set Last_Player's camera Distance to target to 1100.00 over 0.75 seconds
                                Camera - Set Last_Player's camera Angle of attack to -20.00 over 0.75 seconds
                                Camera - Set Last_Player's camera Rotation to (Facing of Last_Unit) over 0.75 seconds
                                Skip remaining actions
                            Else - Actions
                                Do nothing
                        -------- First-Person camera --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Last_Camera Equal to 2
                            Then - Actions
                                Set Last_Unit = Hero[(Player number of Last_Player)]
                                -------- Not Finished Yet... --------
                                Skip remaining actions
                            Else - Actions
                                Do nothing
                    Else - Actions
                        Do nothing

---

instead of writing something... just use an ability instead.. 1000times better.
personally, i really hate maps where u have to type in things, to get things to work. Example
-withdraw , -camlock, -go, ........ ;)
So, ye, put an ability instead on your unit, i doubt u got 6 abilities on it... ;)
If u do got 6 abils, well, change the stop button, to an ability "lock cam" and change its icon..? Since stop button (using hold pos instead)= rarely used.. i mean NEVER!... When "unit issued order stop" > do actions... :rolleyes: :confused:
Cheerio
I didn't modify heroes or abilities. I tried to add Elemental Tri Fury; but it didn't work. I think I can do something like spellbook and put commands in it.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Knocksious: Yes.. change its icon at least (through game interface) BUUUT! When it comes to the "display text" msg, above the stop icon, im not that sure, never tested/checked/tried...:cool: to use the stop button is also like an last resort..if you have used all the slots....
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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 Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top