• 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.

How to set the camera using -cam xyz

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,911
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