Introduction to Kismet - PowerPoint PPT Presentation

introduction to kismet n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction to Kismet PowerPoint Presentation
Download Presentation
Introduction to Kismet

play fullscreen
1 / 88
Introduction to Kismet
107 Views
Download Presentation
chelsey
Download Presentation

Introduction to Kismet

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Introduction to Kismet Sai-Keung Wong Reference: Mastering Unreal Technology (MUT)

  2. Contents • What is Kismet? • Examples

  3. Introduction to Kismet • A visual scripting system • Easy to use • Programming experience is not required. • Examples, • Design simple queries/tasks for players • Turn on/off light sources • Change materials of a static mesh • Activate complex event sequences

  4. Introduction to Kismet • A network of sequence objects (序列對象) • Sequence Objects: • Define specific functions • Send signals to each other • How to use? • Make sure you understand clearly your purposes • Then everything is easy to manage

  5. A simple example:Turn on/off a spotlight • Purpose: • The player touches a trigger • Turn on a spotlight • Need to do: • Add a trigger • Add a togglable spotlight • Add a point light with low intensity (dim) • Add a start position for the player • Use Kismet to define the event sequence for the trigger and the spotlight

  6. A simple example:Turn on/off a spotlight • File -> New -> Additive • Create an additive brush (512x512x64) • Create the geometry using the additive brush • Create a point light • Place it at the center of the newly created geometry and move upwards a bit • Change its intensity to 0.5 • Change its radius to 480

  7. A simple example:Turn on/off a spotlight • Add a trigger • Set it as visible • Press F4->Display->Hidden (don’t check it) • Add a SpotlightToggleable (可開關 spotlight)。 • Content browser->actor->light->spotlight->SpotlightToggleable • After creating the spotlight, change its properties • Disable it (F4->light->lightcomponent->Enabled? NO) • Brightness : 4.0

  8. A simple example:Turn on/off a spotlight • Now, create an event sequence using Kismet • Select the trigger • Open the Kismet editor • Right click (click right mouse button)->New event using trigger_0->Touch

  9. A simple example:Turn on/off a spotlight • Go back to the level editor • Select the SpotlightToggleable • Go back to Kismet • Right click->New action->toggle->toggle • Then, right click ->New Object Var Using SpotlightToggleable

  10. A simple example:Turn on/off a spotlight • Now, connect the sequence objects by dragging lines from the connectors • Press left mouse button at one connector and move the cursor to another connector. Then release the left mouse button • Connect “Touched” of “Tigger_0 Touch” to “Turn On” of “Toggle” • Connect “UnTouched” of “Tigger_0 Touch” to “Turn Off” of “Toggle” • Connect “Target” of “Toggle” to SpotlightToggleable_0 • Save, build light maps and test the game level

  11. A simple example:Turn on/off a spotlight

  12. A simple example:Turn on/off a spotlight • Test the game level • When the trigger is touched, the spotlight is turned on. • But it is not turned off if the trigger is untouched. • To solve the problem • Go back to kismet • Click “Tigger_0 Touch” • Change “Max Trigger Count” to 0 (infinite) • Save and test the game level

  13. Max Trigger Count

  14. A simple example:Turn on/off a spotlight • Now, add a log action to show messages to players (Misc -> New Action -> Log)

  15. A simple example:Turn on/off a spotlight • Input “Spotlight status is changed” in “Obj Comment” of “Log”. Save and test the game level

  16. A simple example:Turn on/off a spotlight Messages

  17. A simple example:Turn on/off a spotlight • Now, add a position for the player to start to play the game. Place it at a corner. • In level editor • Right click->add actor->add PlayerStart • Save and test

  18. Sequence Object • Input/Output connectors • Left connectors: usually for input signals • Only one input, called as “In” • Purpose: Activates other events • Right connectors: usually for output signals

  19. Sequence Object • Example: Toggle(開關) • Has many inputs, depended on the functions of the sequence object • Example, Condition • Has many outputs • Inputs (squares) & Outputs (triangles) at the bottom Purpose: interact with variables

  20. Types of Sequence Object • Event(事件) • Actions(動作) • Variables(變量) • Condition(條件) • Matinee

  21. Events(事件) • Activate a signal to start a sequence • Something occurs in the game levels • Examples: • Players touch an object • Players toggle a trigger • Etc.

  22. Actions(動作) • Associate with event sequences • Perform certain tasks, e.g. • Change materials of an object • Change the value of a variable • Teleport a player to other place

  23. Variables • Variables(變量) • Store data • Can be modified in a sequence • Example, • Use a variable to represent a player • Use a variable to represent a teleporter

  24. Variable Types • Boolean:红色; • Integer:青色; • Object(對象):紫色; • String(字符串):綠色; • Vector(矢量):黄色; • Union(聯合体(無類型)):白色

  25. Conditions(條件) • For testing purpose • Based on the results, control the flow a sequence

  26. Matinee • Matinee • Control Matinee sequence

  27. Kismet Sequence Flow • Event and action sequences • An event sequence calls an action sequence • An action sequence calls another action sequence • Etc. • There must be a starting point for activating other sequences • Action sequences cannot be activated themselves on their own.

  28. Sound • Touch a trigger • Turn on a light source • Play a sound clip • In Kismet • Right click->new action->sound->play sound • Connect “Out” of “Toggle” to “Play” of “Play Sound”

  29. Content browser->sound cues->select a sound clip In Kismet, “use selected object in content browser for “Play Sound” object. Save and test.

  30. Sound • Assign two sounds for “Touched” and “UnTouched”, respectively.

  31. Kismet: Changing Materials • Change the material of an object • Content browser->static mesh->select a static mesh • Go back to level editor • Place the static mesh • Content browser->create MaterialInstanceConstant

  32. Kismet: Changing Materials

  33. Create and assign a material as the parent of the newly created MaterialInstanceConstant

  34. Define a scalar parameter named as “MaterialControl”. Set its value as 1.

  35. Kismet: Changing Materials • Assign the newly created MaterialInstanceConstant to the static mesh

  36. Kismet: Changing Materials • Now, • Create a Kismet sequence to change material of the static mesh • Create a “touch” trigger event for the trigger

  37. Kismet: Changing Materials • Right click->new action->material Instance->Set ScalarParam

  38. Kismet: Changing Materials Create two “Set ScalarParam”. Set the Scalar value of one as 1.0 and another as 0.0. Set the Param Name as “MaterialControl”. Set the Mat Inst as the newly created MaterialInstanceConstant

  39. Kismet: Changing Materials

  40. Kismet: Changing Materials • Save and test

  41. Delay action Touch the trigger to change the material. After 3 seconds, the material is changed back automatically.

  42. Kismet: Changing Materials •      Level startup event

  43. Simple Example: Spawn • actor的spawning(生成) • Examples, create enemies • Spawn enemies on demand • Spawn static meshes

  44. Simple Example: Spawn • Add navigation points • Actor->pathnode • Add around five. • Then we will assign them to the factory spawn points