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

Camera Zoom

Status
Not open for further replies.
Level 9
Joined
Dec 22, 2008
Messages
490
My trigger:
  • Camera - Set (Triggering player)'s camera Distance to target to (((Real((Entered chat string))) / 100.00) x 1650.00) over 1.00 seconds
I want to set the camera to the % of the chat string I enter. For example, if I type '-cam 120' the zoom will be set to 120% of the standard W3 camera. Any ideeas how to do this?
 
Level 9
Joined
Apr 19, 2011
Messages
447
I don't know if it's possible to make that. However, you could try this event:

  • Player - Player 1 (red) types a chat message containing (-cam + (String(NUMBER))) as An exact match
In the action you posted, change [Entered chat string] for NUMBER. (A real variable, call it however you want)

In "NUMBER" you can write 120, 140, 160... whatever you want. I didn't try if it works, but I suppose that if you create some triggers with this, you could make the player able to zoom the camera to several different zooms. Then, you could send a message to the player and inform him about the different zooms he can set.
I don't know if this can be made in order to accept any number you write, maybe others can help you with that.

I hope this helped.

Regards
 
Level 6
Joined
May 13, 2009
Messages
260
Use substring, it checks if "-cam" is in the message
Player - Player 1 (Red) types a chat message containing -cam as A substring

The condition is that the 4 first characters are exactly "-cam"
(Substring((Entered chat string), 1, 4)) Equal to -cam

Then set the variable to everything after: (5th char is a space so we skip it)
Set variable = Real( substring((Entered chat string), 6, 100) )

:)
 
Level 9
Joined
Dec 22, 2008
Messages
490
Thank you for your assist, Mcasdf. This helped me understand the subtrings function as well as fixing my trigger. I will add you to the credit list.

Thread can be closed.
 
Status
Not open for further replies.
Top