#importing lua functions
1 messages · Page 1 of 1 (latest)
You should be able to use functinos from addon_game_mode.lua, as this file is one that gets loaded when the game start - hence the code is aware of those functions.
For any other file, you must use the require syntax to load in other files. I generally recommend requiring the important files in the addon_game_mode.lua file.
You can see an example of this here:
Thanks! I'll do it.
You cannot use stuff from addon_game_mode
It is an exception file with strange scoping
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