Attach sprite(model) to player
How Attach sprite(model) to player??
|
With a specific command
|
What a specific command? I think with client message, but i dont' know by what message i need..... :(
|
message_begin(MSG_ALL,SVC_TEMPENTITY)
write_short(TE_PLAYERATTACHMENT) write_entity(id) write_coord(z axis offset from user origin) write_short(model index) write_short(life) message_end() |
If i understand, by TE_PLAYERATTACHMENT i can set only z origin, but i need create a sprite which be in front of player model, so i need set x & y origin too.
|
you spawn a info_target and set the model to the sprite and then set the origin to the origin +/- the difference with entity_set_model and entity_set_origin
then set EV_INT_movetype to MOVETYPE_FOLLOW and the EV_ENT_aiment to the user |
If it not difficult for u, plz write some code, because i'm not understand all good.
|
Code:
|
I must draw sprite for 1 cycle, when i use code by IceMouse[WrG], becouse origins out of date after every cycle. I am right ?
|
Yes you have to redraw it, or give it velocity... Use Entity_prethink or whatever it is
|
| All times are GMT -4. The time now is 14:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.