![]() |
|||||
![]() |
|||||
|
CMPUT 620 - Programming Languages and Environments for Computer GamesUnreal FAQWhile I was trying to learn Unreal, there were many situations where it took me a long time to figure out how to do some of the most simple things. Here are some questions that I asked myself and (eventually) answered. If you encounter similar situations, please email me the question and your solution in plain text and I will incorporate it onto this web page to make it easier for others. How do I navigate in the Unreal Editor?A good explanation can be found in Rachel Cordone's first tutorial. Here is the most important exerpt: "Right now we only have to worry about how to move around in the viewports. For the 2d viewports, navigation is simple. Holding the left mouse button and moving the mouse moves us around, while holding the right mouse button moves us around at twice the speed. Holding both mouse buttons allows us to zoom the view. Moving the mouse up zooms out, and moving it down zooms us in. For people with a scroll mouse, the mouse wheel can be used to zoom as well. Navigation in the 3d view takes a little getting used to. Holding the left mouse button moves the camera as if it were a person walking on level ground. Up and down moves the camera forward and backward, while left and right turns the camera left and right. Holding the right mouse button makes the camera act like a person standing still and looking around. Up and down makes the camera look up and down, while left and right make the camera look left and right. Holding both mouse buttons allows us to move the camera while it continues to look straight ahead. Up and down moves the camera up and down, while left and right moves the camera left and right. Take a little bit of time to practice moving around in the viewports until you are comfortable with it." How do I move or rotate an actor in the Unreal Editor? Since I am interested in scripting, not creating artistic content, I skipped all of the material in the "Introduc†ion to UnrealEd" document and the "UnrealEd Manual: Interface" document about creating the world and brushes. It turns out that the trick to manipulating an actor is to discover that an actor is sometimes considered as a brush. I discovered this by reading a line in Rachel Cordone's second tutorial (note that a Jugg is just one kind of Actor): "A Jugg will appear (or a Jakob for 2k4), which you can move and rotate the same way as you did the Active Brush." After discovering that an actor is a brush, it is just a matter of reading about how to select the actor to make it the active brush and how to move and rotate the active brush. An actor can be selected by left clicking on it to make it the active brush. A description of moving and rotating the active brush is in Rachel Cordone's second tutorial. Here are the relevant excerpts: "Moving the Active Brush - This is best done in one of the 2D viewports, it works the same in the 3D viewport but the direction is hard to control. To move the Active Brush, click on it to highlight it in one of the viewports. Hold Ctrl, then hold the left mouse button down and move the mouse to make the Active Brush move. Another way to move it is by holding Shift instead of Ctrl, this causes the camera to follow the movement. The change in position will not show up in the 3D viewport until you click on it. This can be changed by clicking on the joystick icon at the top of the viewport (NOT the one in the top toolbar that tests the level). Clicking this makes the viewport change to Realtime Preview mode, which among other things shows brush movements as they happen. This can be used in all four viewports, although if you have a slower computer you might only want to have the 3D viewport set to do this." "Rotating the Active Brush - Similar to moving the Active Brush. To rotate it, hold down Ctrl and the right mouse button, and move the mouse left for clockwise or right for counter-clockwise. Holding Shift instead of Ctrl causes the camera to rotate with the brush. If you want to rotate the brush around a different point, the brush origin (small red plus sign) can be moved by holding Alt and the left mouse button." Why doesn't my actor perform its animation? If you put a "PlayAnim" action in your AIScript, it won't play unless you put a "WaitForAnimEnd" action after it. Why doesn't a message appear in the game when the PC triggers a generic trigger that has its "Trigger>Message" property set to a string? I could not get the message to appear when I ran the game by selecting "Play Level" from the Editor. However, if you close the map (press escape to get the Open map screen) and then load the map by selecting the name of the map and pressing the Load Map button, then the message appears in a small font in the upper left corner of the screen. How do I create a subclass of an actor and get that actor into my map? 1. Create your actor class as a subclass of an existing actor class in the Classes sub-directory of the CMPUT620 directory. You may want to copy the default properties from the Pawn620C.uc file. 2. Open a Command Prompt Window and navigate to the C:\UnrealEngine2Runtime\System directory, delete the CMPUT620.u file, type "ucc make" to re-complile the code. 3. After you enter the UnrealEd, the new actor class should appear and you can paint one in your map.
|