FollowEntity()

From Valve Developer Community
Revision as of 23:58, 21 July 2006 by Ts2do (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

void C_BaseEntity::FollowEntity( CBaseEntity *pBaseEntity, bool bBoneMerge = true )

This function is used to control the parent of Template:This entity.

FollowEntity( NULL )

This call makes Template:This entity stop following its parent.

FollowEntity( pBaseEntity )

This call sets Template:This entity's parent to pBaseEntity; it also zeroes Template:This entity's origin and angles, sets its move type to MOVETYPE_NONE and adds the solid flag FSOLID_NOT_SOLID.

FollowEntity( pBaseEntity, false )

The only difference between the settings of bBoneMerge is having it set to false makes Template:This entity not follow pBaseEntity's animations. This is the call to use if the entity should be in a static position relative to pBaseEntity.