Popup messages

From The DarkMod Wiki
Revision as of 19:43, 26 July 2009 by Tels (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Introduction

Often it can be useful to show the player messages on the screen, this is used for instance for instruction in the training mission. This article describes how to make this work.

Usage

For each message you want to show, insert one atdm:gui_message entity in your map. Set the proper spawnargs, then simple target that entity from any trigger.

You can also use atdm:target_message_enable and atdm:target_message_enable entities to disable/enable a certain message.

If you want your message to appear only once, no matter what, use atdm:trigger_once. If it should appear multiple times until a certain condition is fulfilled, use a atdm:trigger_multiple and then a atdm:target_message_disable entity to disable the message entity.

Messages.jpg

Here is an example screenshot from maps/test/trigger_messages.map. The highlighted entity itself is the message. It is targeted by the trigger in the door, showing the message everytime the player steps through the door. The red and green boxes are the atdm:target_message_disable and atdm:target_message_enable entities, that are targeted by two levers.