Hi,
I want to send a message to my allies, and to all players, but i dont get it to work.
I tried Spring.SendMessage and such.
I want to see it like i write myself with a: and s: or without.
Greetings
Message to team / players
Moderator: Moderators
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Message to team / players
To make it exactly as though you typed the command you can use e.g. Spring.SendCommands("say a: hello allies").
Re: Message to team / players
Ah, that easy thx :)
Just for understanding, i have the following code:
Why?
Greetings
Just for understanding, i have the following code:
but the first to appear ingame is Echo.Spring.SendCommands("say a: hello allies")
Spring.Echo ("Echo")
Why?
Greetings
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Message to team / players
Not sure - I'm surprised to see that happen - I can only guess that some Spring.XX commands are put into queues which are only actioned later. Or maybe Spring.Echo gets a special hotline to the output because its (meant to be) used for debugging.
Re: Message to team / players
Okay.
One last question:
Spring.SendCommands (needs ModUICtrl)
( string command1 [, string command2 [ ... ] ] ) -> nil
( {string command1, string command2, ...} ) -> nil
thats from the list, but where to find a list with those commands?
Cant find the say here: http://springrts.com/wiki/Lua_CMDs
Maybe iam totally wrong..
Greetings
and thanks
One last question:
Spring.SendCommands (needs ModUICtrl)
( string command1 [, string command2 [ ... ] ] ) -> nil
( {string command1, string command2, ...} ) -> nil
thats from the list, but where to find a list with those commands?
Cant find the say here: http://springrts.com/wiki/Lua_CMDs
Maybe iam totally wrong..
Greetings
and thanks
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Message to team / players
Echo is executed immetiately. It's like local println/printf.coolmann wrote:Just for understanding, i have the following code:
but the first to appear ingame is Echo.Spring.SendCommands("say a: hello allies")
Spring.Echo ("Echo")
Why?
SendCommand is a (synced) command that is (therefore) first send to the server, then back to the clients and then executed.