Chat Bubbles

Hey there,

I was wondering how you would go about doing Chat Bubbles?

Thanks :)

Replies (3)

Last message on 24 Dec 2017

Size43 (Administrator) on 21 Dec 2017, 21:01:22
There's actually some left-over code for chat bubbles already in the extension. Add this to enable it:

global.__chat_bubbles = true


The general idea here would be to have some system for drawing the chat bubbles, and then hooking that up to gms_script_set_chat_receive. That script might look something like this:

///scr_chat_receive
var sender_id = argument0, message = argument1, color = argument2;
with your_other_player_object
{
    if player_id == sender_id
    {
        // Set the last chat message
        my_last_message = message
    }
}


Then you could obviously draw my_last_message in the draw event of the other player.
PenguinPalaceGame (Topicstarter) on 22 Dec 2017, 11:41:46
Heya, thanks for the reply

So, I've tried both methods but the one I'm interested in is global.__chat_bubbles = true.

Tried putting that code within a few objects now and nothing seems to happen
Size43 (Administrator) on 24 Dec 2017, 15:54:01
Note that it's an experimental, unfinished feature so it might not work correctly.

You should see chat messages that other players send (via the default chat) pop up above the player's head, so you'll need to run at least two clients to test it.