Game Development Community

Adding an in-game popup message box

by Jesse P · in General Discussion · 05/10/2008 (3:13 pm) · 3 replies

Does anyone know for TGE how I would get an in game message to pop up in a box somewhere on the screen when the player enters a trigger. I already understand triggers but need to know how to make a message pop up.

Note: I do NOT want the message to be in that little server message box in the upper left hand corner, but instead want a message to popup somewhere else on the screen for example in the middle of the screen and then disappear after a few seconds.

Thanks in advance

#1
05/10/2008 (5:43 pm)
Create a GUI control and have it Canvas.pushDialog(PopUpGuiName) when you hit the trigger. In the WakeUp event of the GUI, put a scedule to popDialog after the required timeout.
#2
05/10/2008 (6:49 pm)
Darn I thought I was a better coder but that sounds like greek to me. I'm not the most advanced at this stuff. Could I get an example of what the gui control would look like? Thanks a lot for your help
#3
05/10/2008 (7:54 pm)
Awesome I figured it out, there is already a popup gui dialog in the script. I just need to give it a
clientCmdBottomPrint("Foo", 2, 2);
in the trigger and it pops up.

there is also already a
clientCmdCenterPrint("Foo", 2, 2);

The gui file that contains the bottomPrint and centerPrint functions is playGui.gui