Talk:Interacting with the game: Event-based programming

From PioneerWiki
Jump to: navigation, search

The code examples seem to be outdated. I got this working:

local Event = import("Event")
local Comms = import("Comms")

local welcome = function()  
    Comms.Message ("welcome to Pioneer!")
end

Event.Register("onEnterSystem", welcome)

-- I edited the page to reflect your findings. I also think the tutorial could provide a complete Hello.lua file.