Create(): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
| (One intermediate revision by the same user not shown) | |
(No difference)
| |
Latest revision as of 11:53, 20 January 2024
CBaseEntity::Create() creates and spawns a new entity. It can be called directly as well as from an existing object. It makes no difference which way you choose.
The function CBaseTempEntity::Create() has another purpose, it can be used to dispatch an already existing Temporary Entity.
Arguments
const char* szName- The classname of the entity that should be created. Must be a pointer to constant memory; an ordinary string literal like
"npc_class"will do. const Vector& vecOrigin- The initial origin of the entity.
const QAngle& vecAngles- The initial orientation of the entity.
CBaseEntity* pOwner- The owner of the new entity. Pass
NULLif there shouldn't be one.