Raised This Month: $28 Target: $400
 7% 

Solved TE_PLAYERATTACHMENT and pev_frame(rate)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RaZ_HU
Senior Member
Join Date: May 2015
Location: Hungary
Old 12-30-2018 , 13:22   TE_PLAYERATTACHMENT and pev_frame(rate)
Reply With Quote #1

Hi guys.

There is this stock from WC3FT mod that adds a sprite to the player:
PHP Code:
stock Create_TE_PLAYERATTACHMENT(identityvOffsetiSpritelife)
{
    
message_beginMSG_ONESVC_TEMPENTITY, { 00}, id )
    
write_byteTE_PLAYERATTACHMENT )
    
write_byteentity )            // entity
    
write_coordvOffset )            // vertical offset ( attachment origin.z = player origin.z + vertical offset )
    
write_shortiSprite )            // model index
    
write_shortlife )                // (life * 10 )
    
message_end()

It works well, but I would like to use a sprite that has different frames.
Can the pev_frame and pev_framerate set somehow on the entity created above?

If that would work it would save me 10+ "places" in the precache list, because currently the server crashes on de_torn, with only WC3FT installed that has custom files to download.

Last edited by RaZ_HU; 12-31-2018 at 02:50.
RaZ_HU is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 12-30-2018 , 15:41   Re: TE_PLAYERATTACHMENT and pev_frame(rate)
Reply With Quote #2

TE_* are nothing else than visual effects.
That means, they don't have ID.
And without ID you can't use set_pev() function to work with pev_* attributes.
__________________
My English is A0
E1_531G is offline
RaZ_HU
Senior Member
Join Date: May 2015
Location: Hungary
Old 12-31-2018 , 02:50   Re: TE_PLAYERATTACHMENT and pev_frame(rate)
Reply With Quote #3

Thank you for the info.
RaZ_HU is offline
Reply


Thread Tools
Display Modes

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:12.


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