• 🏆 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!

How to set the camera using -cam xyz

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,724
Set an Integer variable equal to the Substring(Entered Message, 1, 5)

Edit: What I meant to say which you already figured out:
Set an Integer variable equal to the Substring(Entered Message, 6, Length of chat string or a limit of your choice)
Then reference this variable in the Set Camera actions.
 
Last edited:
Thanks a lot

cam
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
Conditions
Actions
Set VariableSet int = (Integer((Substring((Entered chat string), 6, 8))))
Set VariableSet int = (int x 10)
Camera - Set Player 1 (Red)'s camera Distance to target to (Real(int)) over 0.00 seconds
 
Status
Not open for further replies.
Top