Controlling node flow using a Gate action
In this recipe we'll change the way that the spawning of Bots, which occurs in a loop, is culled when a target number of 10 Bots have been spawned. In the previous recipe you learned to keep track of how many enemy Bots in the level have been killed by the player, with winning conditions occurring upon a desired total of 10.
Getting ready
Open the map Packt_04_GateAction_Start.UDK. The lesson continues on from the previous one. Note that in Kismet, for the scene, 1 can be set as a bookmark for the main sequence, 2 as a bookmark for the Sub-Sequence Enemies, and 3 as a bookmark for the Sub-Sequence EndSequence.
How to do it...
The Sub-Sequence EndSequence is fired when an Integer Counter reaches a goal of ten Bot Death events. This is what we set up in the last recipe. Double-click on it to open it. Notice that it is set to fire off straight away a comparison called Is Alive which will Destroy any Bots from that point onward (if there are any). This...