ENTITY:SpawnFunction
Description
This is the spawn function. It's called when a player spawns the entity from the spawnmenu.
If you want to make your SENT spawnable you need this function to properly create the entity.
Unlike other ENTITY functions, the "self" parameter of this function is not an entity but rather the table used to generate the SENT. This table is equivalent to scripted_ents.GetStored("ent_name").
Arguments
Example
This is how it is defined in sent_ball
Example
This is how base_edit spawns (also rotates the entity to face the player, remove * 10 if it spawns in the air)