#importing lua functions

1 messages · Page 1 of 1 (latest)

topaz delta
#

Hello guys!
Is it possible to import function from addon_game_mode.lua to my modifier.lua? How do I do that? I'm not very fluent in Lua, sorry if it too basic question, google didn't help me.

dry pawn
tepid crest
#

You cannot use stuff from addon_game_mode

#

It is an exception file with strange scoping

pale dust
#

Functions in addon_game_mode.lua are declared in Entity Scope, you can declare function in global ( like _G.func = function() end, there functions can be called in any scope