• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Halp w/ Camera Commands

Status
Not open for further replies.
Level 16
Joined
Mar 3, 2006
Messages
1,564
  • Camera Height
    • Events
      • Player - Player 1 (Red) types a chat message containing 1 as A substring
      • Player - Player 1 (Red) types a chat message containing 2 as A substring
      • Player - Player 1 (Red) types a chat message containing 3 as A substring
      • Player - Player 1 (Red) types a chat message containing 4 as A substring
      • Player - Player 1 (Red) types a chat message containing 5 as A substring
      • Player - Player 1 (Red) types a chat message containing 6 as A substring
      • Player - Player 1 (Red) types a chat message containing 7 as A substring
      • Player - Player 1 (Red) types a chat message containing 8 as A substring
      • Player - Player 1 (Red) types a chat message containing 9 as A substring
      • Player - Player 1 (Red) types a chat message containing 0 as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 1)) Equal to c
    • Actions
      • Set r = (Real((Substring((Entered chat string), 2, 15))))
      • Camera - Set Player 1 (Red)'s camera Distance to target to r over 0.00 seconds
There were some argument about the way of the events that I made but this works fine, I tested it.
 
  • Camera Height
    • Events
      • Player - Player 1 (Red) types a chat message containing 1 as A substring
      • Player - Player 1 (Red) types a chat message containing 2 as A substring
      • Player - Player 1 (Red) types a chat message containing 3 as A substring
      • Player - Player 1 (Red) types a chat message containing 4 as A substring
      • Player - Player 1 (Red) types a chat message containing 5 as A substring
      • Player - Player 1 (Red) types a chat message containing 6 as A substring
      • Player - Player 1 (Red) types a chat message containing 7 as A substring
      • Player - Player 1 (Red) types a chat message containing 8 as A substring
      • Player - Player 1 (Red) types a chat message containing 9 as A substring
      • Player - Player 1 (Red) types a chat message containing 0 as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 1)) Equal to c
    • Actions
      • Set r = (Real((Substring((Entered chat string), 2, 15))))
      • Camera - Set Player 1 (Red)'s camera Distance to target to r over 0.00 seconds
There were some argument about the way of the events that I made but this works fine, I tested it.

I don't get why you use an event for each number. If the player types a non-number command the real conversion would not fire, thus causing no problem.
 
Ahem. Just do:
  • Camera
    • Events
      • Player - Player 1 (Red) types a chat message containing c as A substring
      • Player - Player 2 (Blue) types a chat message containing c as A substring
      • Player - Player 3 (Teal) types a chat message containing c as A substring
      • Player - Player 4 (Purple) types a chat message containing c as A substring
      • Player - Player 5 (Yellow) types a chat message containing c as A substring
      • Player - Player 6 (Orange) types a chat message containing c as A substring
      • Player - Player 7 (Green) types a chat message containing c as A substring
      • Player - Player 8 (Pink) types a chat message containing c as A substring
      • Player - Player 9 (Gray) types a chat message containing c as A substring
      • Player - Player 10 (Light Blue) types a chat message containing c as A substring
      • Player - Player 11 (Dark Green) types a chat message containing c as A substring
      • Player - Player 12 (Brown) types a chat message containing c as A substring
    • Conditions
      • (Length of (Entered chat string)) Greater than 1
    • Actions
      • Camera - Set (Triggering player)'s camera Height Offset to (Real((Substring((Entered chat string), 2, (Length of (Entered chat string)))))) over 0.00 seconds
 
And yours will fire whenever someone types anything with a number in...

EDIT: Fixed mine. Now it will only fire if you type a valid number above 0

  • Camera
    • Events
      • Player - Player 1 (Red) types a chat message containing c as A substring
      • Player - Player 2 (Blue) types a chat message containing c as A substring
      • Player - Player 3 (Teal) types a chat message containing c as A substring
      • Player - Player 4 (Purple) types a chat message containing c as A substring
      • Player - Player 5 (Yellow) types a chat message containing c as A substring
      • Player - Player 6 (Orange) types a chat message containing c as A substring
      • Player - Player 7 (Green) types a chat message containing c as A substring
      • Player - Player 8 (Pink) types a chat message containing c as A substring
      • Player - Player 9 (Gray) types a chat message containing c as A substring
      • Player - Player 10 (Light Blue) types a chat message containing c as A substring
      • Player - Player 11 (Dark Green) types a chat message containing c as A substring
      • Player - Player 12 (Brown) types a chat message containing c as A substring
    • Conditions
      • (Length of (Entered chat string)) Greater than 1
    • Actions
      • Set TempReal = (Real((Substring((Entered chat string), 2, (Length of (Entered chat string))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempReal Greater than 0.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Height Offset to TempReal over 0.00 seconds
        • Else - Actions
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Use of both takes out any problem.
if you type "clyde ate 3 cakes" it will not fire, for "lyde ate 3 cakes" is not an real, thus it will return 0.00 (right?) ,
And if you type "d100" it will not fire, for the first letter is not a "c" ,
Just use both conditions, and you will be perfectly fine, though i prefer the events of Element of Water,,
 
Status
Not open for further replies.
Top