Hello there! I have a entity that spawns in players legs but not follow the player. What i want? I need to do that entity follow nearest player with some speed (slow). There is example:
image
I have that code,
Code:
set_pev(iEnt,pev_origin, origin)
engfunc(EngFunc_SetModel, iEnt, zombieclass_trap_model)
fm_set_rendering(iEnt, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
set_pev(iEnt, pev_classname, "trap")
set_pev(iEnt, pev_solid, SOLID_TRIGGER)
set_pev(iEnt, pev_movetype, MOVETYPE_TOSS);
engfunc(EngFunc_SetSize, iEnt, Float:{-36.0,-36.0, 0.0}, Float:{36.0,36.0,72.0})
set_pev(iEnt, pev_iuser1, 1)
Tried to use
Code:
set_pev(iEnt, pev_movetype, MOVETYPE_FOLLOW);
set_pev(iEnt, pev_aiment, id);
But thats not what I need