• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

How to set the camera using -cam xyz

Status
Not open for further replies.

Uncle

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