Revealing and hiding scene actors during gameplay
In this recipe we'll look at revealing and hiding actors in the scene using Trigger events and Kismet actions. One consideration is that even though we can hide an object, that won't prevent it from being there, and it's possible to collide with it even when it isn't visible. We'll use a Change Collision action to handle that, and a Toggle Hidden action to handle the visibility.
Getting ready
Open Packt_04_RevealActors_Start.UDK or continue from where you were in the last recipe if you completed it. In this map the Bot handling is already set up, from previous recipes.
How to do it...
In the map are four glowing white spheres. With these, we'll create a sequence where one is visible when the level loads, and touching it hides it and reveals another. In many games, this is a core process for collecting objects, though they might as easily be destroyed as hidden. Usually in such cases there is additional feedback to the player to strengthen the...