Tidying up Kismet networks using Sub-sequences

In this recipe we'll introduce the way to create Sub-Sequences. Sub-Sequences allow you to contextually split up parts of the Kismet network that can stand in isolation. You can still connect to them, and send out connections to other Sub-Sequences. Kismet has a Sequences Window usually docked at the lower right-hand side. When you create Sub-Sequences they show up here, nested under the main sequence. You can create Sub-Sequences inside of other Sub-Sequences. In the icons row at the top of the Kismet Editor, there is an up arrow [ Tidying up Kismet networks using Sub-sequences ] that lets you navigate from a Sub-Sequence to the main sequence.

Getting ready

Open Packt_04_SubSequences_Start.UDK. This continues from where you were in the previous map. In this map the Bot handling is already set up, from previous recipes. Look at the section Bot Handling.

How to do it...

  1. Hold Ctrl + Alt and drag a selection marquee around the entire section of Kismet, as shown here:
    How to do it...
  2. Right-click over the empty canvas and choose Create New Sequence: 21 Objects. You'll be prompted to name the sequence. Call it PlayerPlusBoss. Don't add space to the name as it isn't permitted. You'll get a little node with a blue background, and in the Sequences window you can also expand the list to show the nested PlayerPlusBoss Sub-Sequence. Clicking on that will open it, as will double clicking the node.
    How to do it...
  3. You can also jump to Sub-Sequences using the Bookmarks icon [ How to do it... ] and choosing them from the list.
  4. Inside the Sub-Sequence PlayerPlusBoss, select the nodes outside of the Bot Handling comment box. Right-click and choose Create New Sequence: 8 Objs. Call it PlayerSpawn. Now we've added a nested Sub-Sequence.
  5. Because this PlayerSpawn Sub-Sequence feeds out to the PlayerPlusBoss Sub-Sequence, a Finish Sequence action is automatically added. You can add one yourself by right-clicking and choosing New Action | Misc | Finish Sequence. Double-click the automatically added Finish Sequence node and it will jump you to its destination. Notice there, that there is a Sub-Sequence PlayerSpawn node with an AutoOut0 nub which feeds to the Bot Handling network.

    Tip

    Manually, a New Event | Sequence Activated event can be created with the hot key [ , and similarly the hot key ] can be used to create a New Action | Misc | Finish Sequence action.

  6. While we are here, it's worth mentioning that the Named Variable Bot is used in this Sub-Sequence. It is also referred to by the Destroy action in the Sub-Sequence PlayerSpawn and in the main sequence under a Change Collision and Give Inventory action. This works because the Named Variable is referencing an Object Variable ??? in the main sequence. It is the only way that actions in various Sub-Sequences can refer to the same spawned actor (Boss in this case).
  7. Hit the icon [ How to do it... ] to go up to the main sequence. The section Initial Conditions could easily be selected and added to a new Sub-Sequence, as it stands in isolation from other parts of the network.
  8. In the section commented Collect All Four Orbs, select the nodes highlighted below and create a Sub-Sequence from these called Toggled0.
    How to do it...
  9. The result will show up as shown in the next screenshot. Notice it has two inputs. Actually it only needs one. We'll edit that next.
    How to do it...
  10. Double-click on the Sub-Sequence Toggled0 and run a wire from the first Sequence Activated Event (AutoIn0) to the Delay that the other Sequence Activated Event (AutoIn1) is firing. Then delete the Sequence Activated Event (AutoIn1). Although you could leave it as it was, you only need one of the two, as shown in the next screenshot.
  11. If you make a typo, to rename a Sub-Sequence, right-click on it and choose Rename Sequence.
    How to do it...
  12. You can repeat the pattern for Toggled1, Toggled2, and Toggled3 using the respective chains in the Collect All Four Orbs section of the main Kismet network. An example of this scene, tidied up using Sub-Sequences is in the provided map Packt_04_SubSequence_DEMO.UDK.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.190.182