Talk:Interacting with the game: Event-based programming

From PioneerWiki
Revision as of 14:17, 23 September 2021 by Zonkmachine (talk | contribs) (Comment on changes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.