Raised This Month: $ Target: $400
 0% 

Entity that follows player with some speed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Xpym4uk76
Junior Member
Join Date: Feb 2019
Location: Ukraine
Old 07-03-2021 , 06:35   Entity that follows player with some speed
Reply With Quote #1

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 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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