AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Following Model - Lazy'ass'question (https://forums.alliedmods.net/showthread.php?t=134826)

DaxProxy 08-09-2010 06:01

Following Model - Lazy'ass'question
 
Following Model - Lazy'ass'question
I've done searching, but haven't figured out the right way to do that.
What i'm trying to do, is to get an model following player.
Basically i want to spawn model on top of an player, which will follow this player, just as it would be part of him.

Would anyone give me quick hint on where i should start?

Leon M. 08-09-2010 06:07

Re: Following Model - Lazy'ass'question
 
Search for Hats.

I'm using this code, id is the player.
PHP Code:

    set_pev(iEntitypev_aimentid)
    
set_pev(iEntitypev_movetypeMOVETYPE_FOLLOW)
    
set_pev(iEntitypev_velocity, {0.00.00.0})
    
set_pev(iEntitypev_avelocity, {0.00.00.0}) 


DaxProxy 08-09-2010 07:25

Re: Following Model - Lazy'ass'question
 
Ofcourse, the...hats...i'm sorry for wasting your time and amxx's bandwidth.
But thanks for the code, simple and clean.

Hunter-Digital 08-09-2010 07:31

Re: Following Model - Lazy'ass'question
 
Only aiment and movetype follow are required.

Also, the attached entity sticks at the center of the entity... unless you duplicate the bones of host entity's model to stick it to one point of the model... like in a hand of a player. See player bones and p_* weapon bones for example of that.

DaxProxy 08-09-2010 07:37

Re: Following Model - Lazy'ass'question
 
Thanks for information Hunter-Digital.

Leon M. 08-09-2010 08:04

Re: Following Model - Lazy'ass'question
 
Quote:

Originally Posted by Hunter-Digital (Post 1266266)
Also, the attached entity sticks at the center of the entity

Yes, thats why i talked about hats :) .


All times are GMT -4. The time now is 00:14.

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