AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity following a player (https://forums.alliedmods.net/showthread.php?t=85374)

anakin_cstrike 02-09-2009 11:38

Entity following a player
 
Hi.
Let's say i create an entity and set the origin on a player's leg for example. How can i make that entity to follow the player everywhere? to have the same origin all the time ?

grimvh2 02-09-2009 11:42

Re: Entity following a player
 
maybe this can help you out.

anakin_cstrike 02-09-2009 11:47

Re: Entity following a player
 
Hmm...
PHP Code:

set_peviEntpev_movetypeMOVETYPE_FLY );
set_peviEntpev_ownerid ); 

Can only this 2 functions make that ?

AntiBots 02-09-2009 11:53

Re: Entity following a player
 
MOVETYPE_FOLLOW

and then
set_pev(ent, pev_aiment, id)

PS: You dont need pev_origin only setmodel

anakin_cstrike 02-09-2009 12:00

Re: Entity following a player
 
Quote:

Originally Posted by AntiBots (Post 758816)
MOVETYPE_FOLLOW

and then
set_pev(ent, pev_aiment, id)

PS: You dont need pev_origin only setmodel

Thanks. For what i want to do, i need to set origin =D


All times are GMT -4. The time now is 17:08.

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