AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity that follows player with some speed (https://forums.alliedmods.net/showthread.php?t=333320)

Xpym4uk76 07-03-2021 06:35

Entity that follows player with some speed
 
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

Xpym4uk76 07-06-2021 13:01

Re: Entity that follows player with some speed
 
UP!


All times are GMT -4. The time now is 02:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.