Create(): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{lang|Create()}}
{{lang|Create()}}
'''<code>CBaseEntity::Create()</code>''' creates and [[Spawn():pt-br|spawna]] uma nova [[ entity:pt-br | entidade ]].Pode ser executado diretamente e também com um objeto existente. Não faz nenhuma diferença na maneira que você escolhe
'''<code>CBaseEntity::Create()</code>''' creates and [[Spawn()|spawns]] a new [[entity]]. It can be called directly as well as from an existing object. It makes no difference which way you choose.


A função  <code>[[CBaseTempEntity]]::Create()</code> tem outro proposito, pode ser usado para despachar uma [[Temporary Entity:pt-br | entidade temporária ]] que já existe.
The function <code>[[CBaseTempEntity]]::Create()</code> has another purpose, it can be used to dispatch an already existing [[Temporary Entity]].
== Parametros  ==


== Arguments ==
; <code>const [[char]]* szName</code>
; <code>const [[char]]* szName</code>
: O [[classname:pt-br | classname ]] da entidade que deve ser criada. Deve ser um ponteiro para memória constante; uma string literal comum como <code>"npc_class"</code> servirá.
: The [[classname]] of the entity that should be created. Must be a pointer to constant memory; an ordinary string literal like <code>"npc_class"</code> will do.
; <code>const [[Vector:pt-br | Vector]]& vecOrigin</code>
; <code>const [[Vector]]& vecOrigin</code>
: A [[origin:pt-br | origin]] inicial da entidade.
: The initial [[origin]] of the entity.
; <code>const [[QAngle:pt-br | QAngle]]& vecAngles</code>
; <code>const [[QAngle]]& vecAngles</code>
: A orientação inicial da entidade.
: The initial orientation of the entity.
; <code>[[CBaseEntity:pt-br | CBaseEntity]]* pOwner</code>
; <code>[[CBaseEntity]]* pOwner</code>
: O [[owner:pt-br | dono ]] da nova entidade. Passe <code>NULL</code> se não deveria haver um.
: The [[owner]] of the new entity. Pass <code>NULL</code> if there shouldn't be one.


[[Category:Programming:pt-br]][[Category:pt-br]]
[[Category:Functions]][[Category:English]]

Latest revision as of 12:53, 20 January 2024

English (en)Deutsch (de)Português do Brasil (pt-br)Русский (ru)Translate (Translate)

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 NULL if there shouldn't be one.