Why is it that the following works in the Engine module:
Code:
new ent = create_entity("info_target");
entity_set_origin(ent, m_flOrigin);
entity_set_vector(ent, EV_VEC_angles, m_flAngles);
entity_set_string(ent,EV_SZ_classname,g_szFakeCorpse);
entity_set_model(ent, m_szModel);
entity_set_float(ent,EV_FL_framerate,1.0);
entity_set_int(ent, EV_INT_sequence, m_iSequence);
But when I convert it to FM, it does not work:
Code:
new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
engfunc( EngFunc_SetOrigin, m_flOrigin );
set_pev( ent, pev_angles, m_flAngles );
set_pev( ent, pev_classname, g_szFakeCorpse );
engfunc( EngFunc_SetModel, m_szModel );
set_pev( ent, pev_framerate, Float:1.0 );
set_pev( ent, pev_sequence, m_iSequence );
It simply does not show any entity in the world with FM. I've tried simple set_pev commands instead of SetOrigin and SetModel in the FM part...nothing.
The variables being used to set the entity variables are safe and sound as they work fine in engine. They are being retrieved from a message it's hooking (ClCorpse)
g_szFakeCorpse is a global entity, "fakecorpse"
__________________