• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 4
Joined
Jun 20, 2008
Messages
22
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:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
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):


  • 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...
 
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
    • 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:
Level 28
Joined
Jan 26, 2007
Messages
4,789
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).
 
Status
Not open for further replies.
Top