How to access Actor name or properties from "articulatedentity.cpp" ?

#1
How to access Actor name or properties from "articulatedentity.cpp" ?

i need to access the actor property "bMy_Property" in the articulatedentity.cpp function "CArticulatedEntity::Action()":

something like:

int CArticulatedEntity::Action(pe_action *_action, int bThreadSafe)
{
(...)
if (_action->type==pe_action_impulse::type_id) {
(???)m_actor(???)
bool my_var;
SmartScriptTable props;
if (m_actor.GetEntity()->GetScriptTable() && m_actor.GetEntity()->GetScriptTable()->GetValue("Properties", props)){
props->GetValue("bMy_Property", my_var);
CryLogAlways("bMy_Property:%i",my_var);
}
(...)
}
(...)
}
(...)
ManuKor
www.HeathenGame.com
Image

Re: How to access Actor name or properties from "articulatedentity.cpp" ?

#2
For GameSDK, you may want to do something like:

Code: Select all

#include <CryGame/IGameFramework.h>
gEnv->pGameFramework->GetClientEntity()->GetScriptTable();
or

Code: Select all

#include <CryGame/IGameFramework.h>
#include <../../GameSDK/GameDll/Player.h>
CPlayer *pPlayer = static_cast<CPlayer *>(gEnv->pGameFramework->GetClientActor());
pPlayer->GetEntity()->GetScriptTable();
Uniflare
CRYENGINE Community Coordinator
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 3 guests