Author: Renan Lopes (Ayalaskin).
Your really first game
Kismet – Trigger - Matinee - Fog - Sounds - Emitters - Teleport
All the basics of course.
Am a Brazilian, so I ask sorry about my English in advance.
Note: Because the 9 images per post, I'll have to divide the tutorial in 3 parts.
A few days ago i was complaining about the lack of good documentation and tutorials about some aspects of the UDK, not the artistic creating content and level design, but in the functionality and gameplay aspect of the engine.
So i’ve decided to make a few tutorials about what i’ve learned these days.
I’am a programmer so my efforts are to make things to Work, not to Appeal.
We will make a simple level with a locked door between two basic rooms.
In the first room we will pick the key for the door, and we will make a simple matinee scene so the doors moves unblocking the way when the player touches it while having the key, and in the second room, you will be able to active a bomb and do some blowing effects, and to finish covering the basics aspects of the engine, we will make a teleport that ports the player from the room 2 to the room 1, and them i will show how to switch your levels, so you can divide your game in different kinds of scenarios.
If you don’t know how to make the 2 rooms basic rooms with a passage between the rooms, refer to the Appendix A before this tutorial.
We don’t have to setup any folder structure or .ini files.
Lets start placing the door, open the Content Browser, in the Building Meshes chooses the door that is in there then close the Content Browser.
Right click in the floor in select’Add Actor > Add InterpActor: Static Mesh ...‘
The mesh MUST be placed with the InterpActor type, or we cant animate it later, if this option don’t shows for you, its because the mesh isn’t loaded, so first select ‘Add Actor > Load Static Mesh ...’.
Place it someway that it blocks the player path.
Now select that door and press F4, so a property window will pop.
Expand ‘Collision’ and mark ‘Block Ridig Body’, and in the Collision Type choose ‘COLLIDE_BlockAll’, now the character can’t pass through this mesh while in play.
We will hide the door key in one statue, so lets place it in the scene, open the Content Browser and in the Mesh Buildings choose the statue.
Right click in the first room floor and selec ‘Add Actor > Add Static Mesh: Static Mesh...’, and put this mesh where you like, i will place it in a corner of the room.
Now lets give a hint to the player that the key remains within the statue, we will add a glow effect, open the ‘Content Browser’ and in the’ Useful Particle Effects’ select one that you like and close the browser.
Right click in the statue and choose ‘Add Actor > Add Emitter: ...’
The player have to pick the key, so lets create a trigger, right click in the statue and choose ‘Add Actor > Add Trigger’.
The trigger must be near the floor, or the player will have to jump to active it, make sure that the trigger is selected before going ahead.
Its time to play with the Kismet Editor, open it by clicking in the green K.
First of all, we will create a variable that will tell us if the player have the key for the door, so right click in the gray area and choose, ‘New Variable > Bool’, select the circle that represents the variable in the kismet, and in its properties give it a name like ‘PlayerKey’.
Right click in the gray area again and choose ‘New Event Using Trigger_0 > Used’.
We will make this event give the key to the player, right click in the grey area and choose ‘New Action > Set Variable > Bool’.
Drag a wire from the slot ‘Used’ in the event trigger, and lik it to the ‘In’ slot of the set variable object. Link the ‘Target’ slot from the set variable with the PlayerKey variable.
Right click the ‘Value’ red square slot in the set variable and choose ‘Create New Bool Variable’, select this new variable and set the property ‘b Value’ to 1.
You should get something like this: