Multiple Entities

Is it possible to create more than one entity in one script? For example:


AddCSLuaFile()

DEFINE_BASECLASS("base_anim")

etc...

DEFINE_BASECLASS("weapon_base")

etc...

You can if you do it in a plain Lua file and use weapons.Register/scripted_ents.Register.

Why bother tho

Just to see if you can?

To make the files compact and easier to read in some cases. If I’m able to categorize everything without folders it’d make my life easier.

You don’t have to have folders. See examples here:

I don’t see how shoving everything into 1 file is “easier to read” or “make your life easier”.

I do this for my custom entity modules

but that’s just because I’m OCD :toxx:

You’d be surprised.