Table of Contents:
[Goto=2]2.Triggering your Preplaced Cameras[/Goto]
[Goto=3]3.Triggering Cameras with no Preplaced Cameras[/Goto]
[anchor]1[/anchor] Preplaced Cameras
A preplaced camera is a camera which has been placed on the map previously. This type of camera will be placed within the Terrain Editor.
Here are the steps to placing a preplaced camera:
• Go to the Terrain Editor
• Find the Tool Pallette
• Change it to a Camera Pallette
• Press CTRL while Right Click dragging, to find the angle and point you wish the camera to be at.
• Press "Create Camera".
Now we have a preplaced camera, but what if we didn't like where it went?
• Press CTRL while Right Clicking and dragging, to find the angle of the new point you wish the camera to be at.
• Press "Set Camera to Current View".
And now, we have moved the camera to a new position.
To change your current view in the World Editor, select the camera you wish to see, and press "View Selected Camera". This will change your current view to the exact angle of the selected camera.
At any time, press Mouse3, the scroll button on your mouse, to return to Game View. Game View is the exact angle which you see by default in game.
[anchor]2[/anchor] Triggering your Preplaced Cameras
So, now we have cameras on the map, so what?
Well, with triggers, we can do many things with those preplaced cameras.
For starters, let's try instantly moving the camera to the position of a camera, as soon as the game begins.
We use Time - Elapsed game time is 0.00 seconds, as Map Initialization does not always work for every camera function.
There is our trigger.
What it does:
• Waits for 0.00 seconds, (Basically, as soon as the map begins, and all initialization triggers have run)
• Finds Camera 001, and Player 1
• Moves Player 1's camera directly to Camera 001, over 0.00 seconds (Instantly)
Now we have a used camera in the game.
At this point, I advise you to test the map you have created, to see just exactly what happens, and if you get a glimpse of the original starting position and angle designed for Warcraft 3.
If you got a glimpse of the original starting position designed for Warcraft 3, you may want to make the transition smoother, as it may be odd for players to see the starting camera, then suddenly jerk to another area on the map, and a new angle.
How to go about doing this:
First, we need a preplaced camera, and why not use the same one as before.
Now, let's rebuild the old trigger.
What to change?
Well, to make it smoothly move over to Camera 001, we simply need to add a time other than 0.00 seconds!
Why wait 5.00 seconds?
Because if you want to run an action after you have finished panning the camera for Player 1 to Camera 001, you will need to wait 5 seconds, which is the time it will take to pan there!
So, now you know how to simply activate a preplaced camera, but what use would you have from this?
Well, with this knowledge, you are able to move a players camera. This is very useful for cinimatics, and other things. Also, once the camera takes the position of another camera, you may move it around, but it will stay at the same angle, unless the player uses the scroll.
So how do I fix that?
It depends on what you're aiming for.
Let's do it so once it is finished moving to Camera 001, it waits 20 seconds there, then reverts back to the typical game settings.
So, let's pull our old trigger back again.
What to change?
We will simply change the wait time, and add a new action.
What have we done?
Well, once it has applyed Camera 001 for Player 1, over 5.00 seconds, it waits 5+20 seconds, (25 seconds), and then resets the camera back to normal after 5 seconds.
Why wait 5.00 seconds at the end?
If you wished to add further actions after the camera is reset, you may want to wait for it to be perfectly normal - Not still changing to normal game camera - before you wish to do your next action.
Why is this useful?
This is useful, because if you wish for the player in game to be able to see a certain point, stay at that point for 20 seconds, then be able to move again, you can do that.
What if I didn't Reset the Camera
If you failed to reset the camera, the player would be stuck watching the game from the same angle as Camera 001, the same rotation as Camera 001, and the same height as Camera 001. The player WILL be able to move his camera, but may get annoyed at the angle.
All right, at this point, if you are lost, continue to read it over, but if you are honestly lost by now, I suggest stopping cameras, and merely doing other things.
[anchor]3[/anchor] Triggering with no Preplaced Cameras
What is the purpose of triggering with no preplaced camera, if we could just set a preplaced camera onto the map?
The idea of this, is if you wished to not always have the point in the same spot on the map, you can simply use this method. Also, it will enable you to be able to
Oooh! Show me! Show me how!
Calm down. Before we start this, let's learn about the triggers for cameras.
Apply Camera Object(Timed) - Will apply a preplaced camera from the editor.
Pan Camera(Timed) - Will pan the camera to a preset region over time.
Pan Camera with Interpolated Height - Pans the camera to a place with a preset height.
Pan Camera as Nessecary - Pans the camera if the player is close, else it will instantly move the camera to that location. This is a desync action, never use it in a multiplayer map.
Set Camera Field(Timed) - Sets a camera field over time.
Rotate Camera around point - Will rotate the camera around a point for (Number)°.
Lock Camera to Unit - Locks the camera to a unit.
Lock Camera Orientation to unit - Locks the camera to a unit offset by something.
Play cinematic sequence - Will play a premade cinimatic sequence (Unnessicary)
Stop Camera - Stops the camera for a player no matter where it is going.
Reset Game Camera - Resets the camera entirely for a player.
Change Camera Smoothing Factor - Will make the camera very smooth and nice if set to a high number.
Reset camera smoothing factor - Sets the cameras smoothing factor to normal.
Sway camera source - Sways the camera source for a player with a velocity and magnitude.
Sway camera target - Sways the camera target for a player with a velocity and magnitude.
Shake Camera - Will shake the camera up and down for a player with magnitude.
Stop Shaking/swaying camera - If the camera was Shaking or Swaying, it will stop.
Extend/shrink camera bounds - Will allow your camera to go farther around the map or less far around the map then before.
Set Camera Bounds - Locks the camera to a specific region, rendering you unable to move out of that region
Set Camera-Spacebar point - Sets the point where if you press spacebar it will take you there.
Look each of these over carefully, and try experimenting with them, before continuing.
Now that you have read each of those, and hopefully understand, let's go in deeper.
First off, let's determine exactly the Far Z of a preplaced camera which we wish to have, as well as the Distance to Target, Angle of Attack, Field of View, Rotation, and Height Offset.
For good practice, use this trigger:
Write down the order of those, so on a peice of paper, write something like this:
• Distance to Target :
• Far Z :
• Angle of Attack :
• Field of View :
• Rotation :
• Height Offset :
Then, once in game, fill out the paper, for example:
• Distance to Target : 500.00
• Far Z : 23.51
• Angle of Attack : 96.12
• Field of View : 125.32
• Rotation : 126.43
• Height Offset : 700
So, now we have all these things, but what do we do with them?
Basically, all this information the game has returned to us, is all the information the game uses, to store 3 simple things.
1. How high the camera is.
2. What the rotation of the camera is
3. The angle of the camera veiw.
With these things, we can watch the game from a new point of view!
So, now, let's take them, and make the camera look EXACTLY like your old camera, except in a random spot on the map.
First off, we are going to want to create a preplaced camera, called Camera 001.
We will then run the above trigger, to find out exactly how this Camera 001 is placed, except for the position on the map.
Then, we will want to create a trigger, which will find a point on the map, and set the angles/height/rotation to that of Camera 001.
So, start like this:
Woahwoahwoah! What's going on?!?
Well, basically, we will input the information we gathered before into the places which say 0.00. No, not the 0.00 seconds, but the value of 0.00.
Also, the camera will first "pan" or "move" instantly to a random point within the map. It is instant because it is 0.00 seconds.
But why do it so complicated, with so many steps?
Well, there is an alternate way to do it, but the above way will save you a bit of file size space, if you want to have a lot of imports, to say.
By now, you understand quite a bit about cameras.
Before you continue onto the next post, make sure you complete the following challenges:
• Lock the camera onto a unit, and while having it locked, change the view to that of a preplaced camera.
• Pan the camera around the map, using many points, with regions.
• Create a Third person camera.