Search

Search found 66 matches

by LEDZ
16 Jul 2011, 11:32
Forum: Lua Scripts
Topic: Send message to all players from gadget
Replies: 11
Views: 1873

Re: Send message to all players from gadget

http://pastebin.com/Y0PPsGZg

These lines are responsible for the message process.
Using SendMessageToPlayer is my latest attempt.
I have also tried Echo and SendMessage with exactly the same results.
by LEDZ
16 Jul 2011, 03:26
Forum: Lua Scripts
Topic: Send message to all players from gadget
Replies: 11
Views: 1873

Re: Send message to all players from gadget

I've tried a these and it still doesn't work. Each player only sees their own announcements instead of everybody's.
I even tried Spring.SendMessageToPlayer which each playerID with the same outcome. Anyone know why?
by LEDZ
15 Jul 2011, 02:35
Forum: Lua Scripts
Topic: Send message to all players from gadget
Replies: 11
Views: 1873

Send message to all players from gadget

What Lua function does one use when wanting to show a message to all players.
An event occurs for player1 (lost 10 units), gadget sends message to all players with "player1 has lost 10 units"
I thought it was Spring.SendMessage but I just tested it with no luck.
Anyone know?
by LEDZ
28 Jun 2011, 10:36
Forum: Lua Scripts
Topic: Colour in Echo text.
Replies: 7
Views: 1283

Re: Colour in Echo text.

Ahh thats great. I tried string.char in one attempt but I misunderstood. I knew that it took a number as a key for a particular character, but I didn't consider that that is exactly what "\number" was doing as well.
It seems to be working fine now. Thanks.
by LEDZ
27 Jun 2011, 17:34
Forum: Lua Scripts
Topic: Colour in Echo text.
Replies: 7
Views: 1283

Re: Colour in Echo text.

Thanks for the quick reply. I'm not sure about it though. The math.floor parts are to make sure the value given is an integer, yes? If so that's not a problem with my code. The string.char: doesn't that convert the numbers into their representative symbols? If so I don't see how this would help. Cou...
by LEDZ
27 Jun 2011, 14:39
Forum: Lua Scripts
Topic: Colour in Echo text.
Replies: 7
Views: 1283

Colour in Echo text.

So I've been learning Lua recently, its been fine for the most part, but now this: nameColorizer = string.format("\255\%s\%s\%s", R255, G255, B255) messageColorizer = string.format("\255\255\255\255") message1 = nameColorizer .. myPlayerName .. messageColorizer .. " has now ...

Go to advanced search