Chapter 18: Scripting the UI, Sounds, and Graphics
In a game, even if the player sees the game through the camera, there is important information that is not visible in plain sight, such as the exact number of bullets remaining, their health, the enemies, whether there's an enemy behind them, and so on. We have already discussed how to tackle those issues with the UI, sounds, and visual effects (VFX), but as we start to move on with scripting in our game, those elements also need to adapt to the game. The idea of this chapter is to make our UI, sounds, and VFX react to the game situation through scripting, reflecting what is happening in the world.
In this chapter, we will examine the following feedback scripting concepts:
- Scripting the UI
- Scripting feedback
By the end of this chapter, you will be able to make the UI react to the game situation, showing relevant information in the form of text and bars, and also be able to make the game react to interactions...