Change Entity property

#1
How can i change entity property?
I've used parameters but don't know how to change entity's properties?
For example: Radius, bulb size, proj.texture and etc...
Here is my code:

Code: Select all

//-- ENTITY SPAWN
// Define
SEntitySpawnParams params;
params.nFlags = ENTITY_FLAG_SPAWNED;
params.pClass = gEnv->pEntitySystem->GetClassRegistry()->FindClass(className.c_str());
params.sName = name.c_str();
params.vPosition = pos;
params.vScale = scale;

Matrix33 mat;
Ang3 ang(DEG2RAD(rot.x), DEG2RAD(rot.y), DEG2RAD(rot.z));
mat.SetRotationXYZ(ang);
params.qRotation = Quat(mat);

// Create
IEntity* pEntity = gEnv->pEntitySystem->SpawnEntity(params);

// Find light entity
IEntity* flashlightItemEntity = gEnv->pEntitySystem->FindEntityByName(name.c_str());

// Attach
if (pEntity != NULL)
{
IAttachment* pAttachment = GetAttachment(localPlayerId);
if (pAttachment)
{
CEntityAttachment* pEntityAttachment = new CEntityAttachment;
pEntityAttachment->SetEntityId(flashlightItemEntity->GetId());

pAttachment->AddBinding(pEntityAttachment);
};
};

Who is online

Users browsing this forum: No registered users and 3 guests

cron