1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Camera Command Help {zoom command, like -cam 500 moves it towards the ground}

Discussion in 'World Editor Help Zone' started by Alecgator23, Jun 7, 2009.

  1. Alecgator23

    Alecgator23

    Joined:
    Jun 20, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    I've been making a map of strategy as my project, and have no idea to change your camera by a command like player 1 red chats -Cam 500, then move the camera in towards the ground. Does this have something to do with variables?

    Your help will be deeply appreciated:gg:
     
  2. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    • Untitled Trigger 001
      • Events
        • Player - Player 1 (Red) types a chat message containing -cam 500 as An exact match
      • Conditions
      • Actions
        • Camera - Set Player 1 (Red)'s camera Height Offset to ((Target Z of current camera view) - 500.00) over 0.10 seconds
     
  3. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Ughe, another one?

    I have just said this in another post and a few weeks ago, there was someone else who needed this.
    Use the "Search" button, it's there for a reason!

    Allright, this is a trigger I have created for my map DoomRaiders ORPG (a 2-year old map, but this trigger is still pretty good):

    Trigger

    • CamZ
      • Events
        • Player - Player 1 (Red) types a chat message containing -Cam as A substring
        • Player - Player 2 (Blue) types a chat message containing -Cam as A substring
        • Player - Player 3 (Teal) types a chat message containing -Cam as A substring
        • Player - Player 4 (Purple) types a chat message containing -Cam as A substring
        • Player - Player 5 (Yellow) types a chat message containing -Cam as A substring
        • Player - Player 6 (Orange) types a chat message containing -Cam as A substring
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Substring((Entered chat string), 6, (Length of (Entered chat String)))) Equal to Empty String
          • Then - Actions
            • Skip remaining actions
          • Else - Actions
        • Set Camera_Distance = (Real((Substring((Entered chat string), 6, (Length of (Entered chat String))))))
        • Camera - Set (Triggering player)'s camera Distance to target to Camera_Distance over 0.20 seconds
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Camera_Distance Greater than or equal to 3000.00
          • Then - Actions
            • Camera - Set (Triggering player)'s camera Distance to target to 3000.00 over 0.20 seconds
            • Set Camera_Distance = 3000.00
            • Game - Display to (All players matching ((Triggering player) Equal to (Matching player))) for 6.00 seconds the text: |c00ff0000Zoomed ou...
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Camera_Distance Less than or equal to 500.00
          • Then - Actions
            • Camera - Set (Triggering player)'s camera Distance to target to 500.00 over 0.20 seconds
            • Set Camera_Distance = 500.00
            • Game - Display to (All players matching ((Triggering player) Equal to (Matching player))) for 6.00 seconds the text: |c00ff0000Zoomed in...
          • Else - Actions


    Example:
    "-Cam 2600" will set the camera distance to 2600

    Min = 500
    Max = 3000
    If you break these limits (like -cam 8000), it will automatically be set to the limit (in this case 3000).

    That isn't really a hard trigger, if you think about it...
     
  4. Alecgator23

    Alecgator23

    Joined:
    Jun 20, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    Hey thanks for the trigger man
    :)
     
  5. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    talking about a late response, lol... you're welcome xD
     
  6. Jack_Sparrow93

    Jack_Sparrow93

    Joined:
    May 9, 2008
    Messages:
    1,431
    Resources:
    6
    Icons:
    5
    Maps:
    1
    Resources:
    6
    But I am glad he did it, so I noticed it, I have my self looked for a camera system :) Thx! +rep
     
  7. Alecgator23

    Alecgator23

    Joined:
    Jun 20, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    well ya sorry for lateness i wasn't on in awhile.
     
  8. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    No kidding :')

    btw: my egg is about to hatch! (I think), click on it, maybe you're the one who makes it hatch :cute:
    (You never know...).
     
  9. Alecgator23

    Alecgator23

    Joined:
    Jun 20, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    and sorry to ask but what is in the variable?
     
  10. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    "Camera_Distance"?
    It's just a real variable... =/
     
  11. Jack_Sparrow93

    Jack_Sparrow93

    Joined:
    May 9, 2008
    Messages:
    1,431
    Resources:
    6
    Icons:
    5
    Maps:
    1
    Resources:
    6
    Something is wrong... I made it as u did, but when I set it on 1000, it set on 500 instead... What is wrong?

    Cam system
    • Cam system
      • Events
        • Player - Player 1 (Red) types a chat message containing -zoom as A substring
        • Player - Player 2 (Blue) types a chat message containing -zoom as A substring
        • Player - Player 3 (Teal) types a chat message containing -zoom as A substring
        • Player - Player 4 (Purple) types a chat message containing -zoom as A substring
        • Player - Player 5 (Yellow) types a chat message containing -zoom as A substring
        • Player - Player 6 (Orange) types a chat message containing -zoom as A substring
        • Player - Player 7 (Green) types a chat message containing -zoom as A substring
        • Player - Player 8 (Pink) types a chat message containing -zoom as A substring
        • Player - Player 9 (Gray) types a chat message containing -zoom as A substring
        • Player - Player 10 (Light Blue) types a chat message containing -zoom as A substring
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to <Empty String>
          • Then - Actions
            • Skip remaining actions
          • Else - Actions
            • Set Camera_Distance = (Real((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
            • Camera - Set (Triggering player)'s camera Distance to target to Camera_Distance over 0.20 seconds
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Camera_Distance Greater than or equal to 3000.00
              • Then - Actions
                • Camera - Set (Triggering player)'s camera Distance to target to 3000.00 over 0.20 seconds
                • Set Camera_Distance = 3000.00
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Camera_Distance Greater than or equal to 500.00
                  • Then - Actions
                    • Camera - Set (Triggering player)'s camera Distance to target to 500.00 over 0.20 seconds
                    • Set Camera_Distance = 500.00
                  • Else - Actions
     
    Last edited: Jun 22, 2009
  12. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    You have used another command ("zoom")
    Everywhere where you see "6", you need to replace it with "7" (it has 1 more character).

    So "(Substring((Entered chat string), 6, (Length of (Entered chat string)))) Equal to <Empty String>"
    Becomes "(Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to <Empty String>"

    If I feel like it, I'll create a trigger where you only need to change the command, all the rest changes on it's own ^^ (with other word: the trigger checks when the integer starts and will read the integer only, the min- and max-values will be variables as well to make it look easier).
     
  13. Jack_Sparrow93

    Jack_Sparrow93

    Joined:
    May 9, 2008
    Messages:
    1,431
    Resources:
    6
    Icons:
    5
    Maps:
    1
    Resources:
    6
    It still dont work :( It just zoom in as far as it is possible 2...
     
  14. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    You have used " Camera_Distance Greater than or equal to 500.00"
    It should be "less than or eqsual to" :p
     
  15. Jack_Sparrow93

    Jack_Sparrow93

    Joined:
    May 9, 2008
    Messages:
    1,431
    Resources:
    6
    Icons:
    5
    Maps:
    1
    Resources:
    6
    Thx a lot, it works exellent :D
     
  16. I)eath2u4me

    I)eath2u4me

    Joined:
    Apr 14, 2007
    Messages:
    428
    Resources:
    6
    Maps:
    6
    Resources:
    6
    Near the beginning of the trigger actions where it says Empty String, I can't find that in the trigger anywhere. Where is it?