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

How to set the camera using -cam xyz

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,564
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