Help with Camera Height

Do you need World Editor help? Ask here!
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.

Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.

Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.

Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)

Help with Camera Height

New postby imsohordee on Mon Aug 15, 2011 9:43 pm

I would like to know how in-game a player can change their camera height from 600-2400?
imsohordee
 
Posts: 7
Joined: Tue Aug 09, 2011 1:35 pm
Realm: US East
Account: imsohordee
Clan: BHoR

Re: Help with Camera Height

New postby 3ICE on Mon Aug 15, 2011 9:44 pm

Via triggers.
Easy: chat commands -close -mid -far etc.
Hard: camera system that detects the user's current camera distance and multiplies it by a percentage to allow for more extreme values.
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2126
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Help with Camera Height

New postby imsohordee on Mon Aug 15, 2011 9:53 pm

That may be a little to difficult for me yet, as i am partially new to world editor. Later on maybe ill try and figure out the triggering for it.
imsohordee
 
Posts: 7
Joined: Tue Aug 09, 2011 1:35 pm
Realm: US East
Account: imsohordee
Clan: BHoR

Re: Help with Camera Height

New postby 3ICE on Mon Aug 15, 2011 9:59 pm

Or we can tell you how to do it step by step. :)
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2126
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Help with Camera Height

New postby manstie on Thu Aug 18, 2011 5:29 am

or set camera distance to number specified... easier...
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Help with Camera Height

New postby 3ICE on Thu Aug 18, 2011 2:29 pm

No, he wants a range of possibilities (600-2400) and that requires a system. The original camera has a much smaller range (800-1200) and he is looking to extend that.
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2126
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Help with Camera Height

New postby manstie on Fri Aug 19, 2011 3:08 am

Use JassNewGen editor to get values higher or lower than original?
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: Help with Camera Height

New postby 3ICE on Fri Aug 19, 2011 4:21 am

Thank you for trying to help him, but this is not useful. If you have the solution then post it, but random vague ideas will not bring this issue forward.
What values?
Why NewGen?
Do you really think they are gameplay constants?
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2126
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: Help with Camera Height

New postby Candlejack on Wed Feb 01, 2012 12:32 am

I'm not aware of how good you are at using the World Editor so I have made the Steps to this tutorial very short and easy to follow.


Step 1: Create a new Variable and name it whatever you want but make sure the Variable Type is set to "Real".

Step 2: Create a new Trigger called "CameraHeight" (Or whatever you want, doesn't matter).

Step 3: Make a new a event and select "Player - Chat Message".

Step 4: Edit the information so it says "Player 1 (Red) types a chat message containing -cam as A Substring". NOTE You will have to create this event for each player (In the same trigger).

Step 5: Create a new Action and select "Set Variable".

Step 6: Select the red underlined "Variable" and set it to "CameraHeight" (Or whatever you labeled your Real Variable in Step 2) and click Okay.

Step 7: Select the red underlined "Value" and under the "Fuction" dropdown list select "Conversion - Convert String to Real".

Step 8: Click on "Entered Chat String" and under the "Function" dropdown list select "Substring".

Step 9: Click on the red underlined "String" and under the "Function" dropdown list select "Event Response - Entered Chat String" and click Okay.

Step 10: Click on the blue underlined "1" and change the value to "6" and click Okay.

Step 11: Click on the blue underlined "5" and change the Value to "9" and click Okay.

Step 12: Click Okay, click Okay again, and click Okay Once more to finally finish that event.

Step 13: Create another Action under the one you just finished and select "Camera - Set Camera Field (Timed)".

Step 14: Select the blue underlined "Player 1 (Red)" and under the "Function" dropdown list select "Event Response - Triggering Player" and click Okay.

Step 15: Select the red underlined "Value" and under the "Variable" dropdown list select "CameraHeight" (Or whatever you named your Variable in Step 2) and click Okay.

Step 16: Click the blue underlined "0.00" and change the value from 0.00 to 1.00. (This step is unimportant, but it makes the camera height transition much nicer, rather than just instantly switching heights.

Now, you can test your command by testing the map and typing "-cam XXXX" into the chat, if everything worked correctly it should lower or raise your cameras height over a period of 1 second.
Even if you type "-cam 2500000000000" it would only change your camera's height to 2500 for reasons explained in the Note for steps 10 and 11 below.

NOTE FOR STEPS 10 AND 11: Changing the two values to 6 and 9 tells the game to only read the characters in the 6th, 7th, 8th and 9th spaces of the message. I have chosen 6 and 9 because of our original command "-cam" which is 4 character long. but if you add a space after that it becomes "-cam " which is 5 spaces long. the next space (being the 6th) is the start of the Camera Height that you want, and the 9th will be the last. (This is because the best camera heights can be found between 2000 and 4000.)
If your original command was not the same as mine you would have to edit the values from steps 10 and 11 to correctly reflect your command. (If your command was "-camera" you would use "9" for step ten and "12" for step eleven.

If you were unsuccessful in creating this trigger I attached a map with a working Camera Adjustment trigger that you should feel free to use, but I would recommend trying to do it yourself by reading the steps to get a better feel for how the more advanced things like Variables work.

I hope this helps you and anyone else who may be having the same trouble.
Candlejack
 
Posts: 26
Joined: Sat Jan 28, 2012 4:52 am
Realm: US East
Account: WaffleFace
Clan: TMMM

Re: Help with Camera Height

New postby 3ICE on Wed Feb 01, 2012 6:13 am

Excellent guide. It will surely help a lot of people, as this topic is now the #3 result on Google for the Warcraft III tutorial change player camera height in-game query. (This topic had 180 hits from Google so far.)

Saving the camera height in a variable is unnecessary. But it does simplify things. (Easier to see what the trigger does.)

But if you are looking to limit the possible values to 600-2400, then the variable comes in handy. Also saves processing time as we don't have to convert string to integer three times.
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2126
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE


Return to HELP



Who is online

Users browsing this forum: No registered users and 2 guests

cron