Chat:gms_chat without the username in start
I want to implement broadcast system in my game.
I tried using gms_chat but it shows my username on start at the message
I also tried using gms_chat_local but it is just local.It removes my username.
What I'm trying to do(chatlog):
Me:/broadcast
{get_string thingy happens,i use "do stuff"}
[broadcast]do stuff
What is happening(chatlog):
Me:/broadcast
{get_string thingy happens,i use "do stuff"}
Me:[broadcast]do stuff
Replies (2)
Last message on 17 Oct 2015
Size43
(Administrator)
on
17 Oct 2015, 15:42:24
One way to achieve this is to have the broadcast messages not use the default chat system, but send a P2P message that you add to the chat manually using gms_chat_local. Assuming you've got a constant (macro) p2p_broadcast defined, that has a value between 0-255, you can use:
// To send a broadcast
for(var i = 0; i < gms_other_count(); i++)
{
var pID = gms_other_find(i);
gms_p2p_send(p2p_broadcast, pID, "Broadcast message")
}
// In the p2p_receive script:
gms_chat_local(ds_list_find_value(argument2, 0), c_black)
Hey! I think I saw you on GMC and also you are my friend on GMC... I am Deep Blue Light.