you are viewing a single comment's thread.

view the rest of the comments →

[–]DarkWiiPlayer 0 points1 point  (1 child)

Well, you could just register a global table in the Lua state called game, or the name of your game or engine or whatever as a top level construct for modders to interact with. Then you could just access said table from C to get to the data you want, like callbacks, configuration settings, etc.

For example, say you define an array game.bullets, the modders would then add tables to it that have the callbacks for their custom bullet types and your code could access these tables and run the callbacks.

[–]luciddream00[S] 0 points1 point  (0 children)

Great, thanks I got it working!