Reputation: 37
So I've created lootable entities, that produce loot from a loot table when being looted. Since I'm going to have different entities all using the same loot tables, Ideally I'd like to have just one file that has the loot table code in it, and include that code in all the entities "init" file. However, I'm not sure how to include that as every time I try It can't find the file. New to garrysmod Lua, how should I go about this? Is there somewhere specific I should put the loot table lua file to be included? Putting it in each entities folder works, but that's really inefficient because if I ever want to update the loot table, I have to update each entities loot table file. This is for a gamemode by the way, not sure if I should be using a special directory in the gamemode files that it looks for or what.
Upvotes: 0
Views: 486
Reputation: 37
Figured it out, you include the file in the shared file for the entity, which is then included in the init
Upvotes: 0