Raised This Month: $ Target: $400
 0% 

movetype_follow offset


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
iNvectus
Member
Join Date: Sep 2014
Location: Bulgaria
Old 10-23-2019 , 02:44   Re: movetype_follow offset
Reply With Quote #6

It is not working, because you cannot change the Z origin of a movetype. You can spawn an info_target and set the model to the sprite, 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.

This way it will probably work, but if you just want to have a sprite above the player's head, instead I'd rather use TE_PLAYERATTACHMENT.

PHP Code:
write_byte(TE_PLAYERATTACHMENT)
write_byte(entity index of player)
write_coord(vertical offset) (attachment origin.player origin.vertical offset)
write_short(model index)
write_short(life 10 
https://www.amxmodx.org/api/message_const
iNvectus is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:40.


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