Time for action — creating a background for the GUI
We want the text displayed to the player to have a consistent background to reduce strain on the eyes of our player. We'll do this using a Panel, an object which can be used for more complex boxes.
1. In the Layout Editor, select the HUD layer and insert a
Panel
object from the object groupGame
.2. Right-click on the Panel and choose Order | To Back from the context menu. Then drag the panel behind the existing text on the HUD and stretch it to cover the text in front of it. Name the object
TextBack
, and then switch back to the Event Sheet Editor.3. Now add an event to the event sheet and select the object
Player
. Use the condition Is overlapping another object to check if it is behind thePanel
object.4. Create the action
Set opacity
from theSystem
object. EnterHUD
in the first box, followed by70
in the second.5. Now add another event underneath and give it the
System
conditionElse
. For this event, add the same action as the previous...