Entity spawning

I created a new sent, only wiki only covers spawning it using ent_create.

I added Ent.Spawnable = true and Ent.AdminSpawnable = true but when I click the entity button in the entity tab nothing happens, but when I use ent_create it works, with works I mean it shows.

Do you have a **[ENT.SpawnFunction

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=ENT.SpawnFunction)** function?

Thank you, didn’t know that :smiley:


When I use the example I get the error : init.lua:21: attempt to call field ‘GetClass’ (a nil value)

Any help with that please ?


I tried using self.Entity but it also didn’t work :frowning:

You can’t use :GetClass() in the spawnfunction, just ype out the classname as a string instead.

You can take a look at either the bouncy ball, or the portal radio 2.0, its a very good SENT to practise with.