• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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