• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Camera Command

Status
Not open for further replies.
Level 7
Joined
Feb 28, 2014
Messages
185
I've make a command system and trying to make a camera command . I've done the trigger but it does'nt work !Can any help ?

  • Zoom
    • Events
      • Player - Player 1 (Red) types a chat message containing -zoom as An exact match
      • Player - Player 2 (Blue) types a chat message containing -zoom as An exact match
      • Player - Player 3 (Teal) types a chat message containing -zoom as An exact match
      • Player - Player 4 (Purple) types a chat message containing -zoom as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -zoom as An exact match
      • Player - Player 6 (Orange) types a chat message containing -zoom as An exact match
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -zoom
    • Actions
      • Set Real = (Real((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
      • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real Less than or equal to 500.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 500.00 over 0.00 seconds
          • Set Real = 500.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real Greater than or equal to 6000.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 6000.00 over 0.00 seconds
          • Set Real = 6000.00
        • Else - Actions
 
Level 7
Joined
Feb 28, 2014
Messages
185
In event "as exact match" is wrong. Use as substring.

In here:
  • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.00 seconds
You can use the variable "Real".

  • Zoom
    • Events
      • Player - Player 1 (Red) types a chat message containing -zoom as An exact match
      • Player - Player 2 (Blue) types a chat message containing -zoom as An exact match
      • Player - Player 3 (Teal) types a chat message containing -zoom as An exact match
      • Player - Player 4 (Purple) types a chat message containing -zoom as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -zoom as An exact match
      • Player - Player 6 (Orange) types a chat message containing -zoom as An exact match
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -zoom
    • Actions
      • Set Real = (Real((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
      • Camera - Set (Triggering player)'s camera Distance to target to Real over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real Less than or equal to 500.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 500.00 over 0.00 seconds
          • Set Real = 500.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real Greater than or equal to 6000.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 6000.00 over 0.00 seconds
          • Set Real = 6000.00
        • Else - Actions
It still can't work.
 
Level 7
Joined
Feb 28, 2014
Messages
185
I have not talked about adding a condition. Read again. :)

Hmm ... Sorry for lately reply but i'm still misunderstand what you say ...
Here I done it in "A substring" , but it still don work , can you show me ?:grin:
  • Zoom
    • 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
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -zoom
    • Actions
      • Set Real = (Real((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
      • Camera - Set (Triggering player)'s camera Distance to target to Real over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real Less than or equal to 500.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 500.00 over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Real Greater than or equal to 6000.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 6000.00 over 0.00 seconds
        • Else - Actions
 
Status
Not open for further replies.
Top