Attaching a sprite to a moving entity.
I'm trying to attach a sprite to a moving entity. I looked through all the temp ents and didn't see anything that would do what I wanted.
I tried to make a an env_sprite entity and set the aiment to the entity I want it to follow. This didn't work. I'm assuming there is a temp ent to do this but I just can't find it. |
Re: Attaching a sprite to a moving entity.
Please show the code you used
|
Re: Attaching a sprite to a moving entity.
Was testing some more and got it working with this code...
PHP Code:
|
Re: Attaching a sprite to a moving entity.
change this:
PHP Code:
PHP Code:
|
Re: Attaching a sprite to a moving entity.
If you're attaching it to a player,
#define TE_PLAYERATTACHMENT 124 // Attaches a TENT to a player (this is a high-priority tent) // write_byte(TE_PLAYERATTACHMENT) // write_byte(entity index of player) // write_coord(vertical offset) (attachment origin.z = player origin.z + vertical offset) // write_short(model index) // write_short(life * 10 ) |
Re: Attaching a sprite to a moving entity.
Quote:
Quote:
Anyhow, it's working perfectly now. Thanks for helping :) |
| All times are GMT -4. The time now is 01:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.