Message windows in games

Does anyone have any advice on making message windows in games?

I want you to be able to have the window triggered, the specific trigger to be able to determine the message body, and be able let the game know when you press the go on button (enter, space, etc…), whether to keep going if theres more text, or to eliminate the window when theres no more message

Ive already tried some ways, and they seem to work, but its too confusing, i want a standard way that all NPC’s can follow so it uses less coding

can you put it in a foreground scene (with your meters) by means of a couple of objects:

One is the background (opaque black)
the other is the text object (add mode faces)

… and they commnicate through properties, and connected logic bricks, (and maybe some python)

your message is displayed in response to a message
(maybe you then suspend your background scene until the user presses a button on the dialog?)
(the background scene is resumed and) a message is sent to the background scene.


the background for the text dialog needs to be opaque because it seems (much to my annoyance) that alpha faces are ALWAYS drawn after add faces resulting in your text likely becoming dark on dark…

I forget now if alpha text faces are always on top of alpha faces, but I think it may be random.

My main question is to figure a way for the game to know when each set of dialogue ends like:

First time talking to NPC#!-1st window"Hello, how are you" <button press> 2nd window “I’m fine, thank you” and then the game knows that thats the end of that dialoge set, but then after that initial conversation, any time after that when you talk to him he says “See you later” and it knows that that is the only set of dialogue

It seem like you need to create a little state mechine for every NPC. Create for NPC property named state, set it to 0. If you try to talk to it, it will check it’s state, outputs proper message and then increments state. You can also control transitions between states of NPC to allow for complex behaviours.

thx, ill try that!