We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 11 of 11

Thread: Lua Chat objet

Threaded View

  1. #1

    Lua Chat objet

    Because I am an utter spaz who can't wait the 1 - 2 days it'll take to get some documentation on the chat object, here's how it works:

    Code:
    function Turbine.Chat.Received(f, args)
    	for k, v in pairs(args) do
    		Turbine.Shell.WriteLine(k .. ": " .. tostring(v));
    	end
    end
    f will be the Turbine.Chat.Received function, and args will have the fields "Sender", "ChatType", and "Message". Looks like it'll need a handler manager so scripts aren't stomping on each other's chat handlers.

    Edit: Oh, and it looks like Turbine.Shell.WriteLines don't trigger the chat received event, so you can't send yourself into an infinite loop that way.
    Last edited by moebius92; Sep 26 2011 at 05:27 PM.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload