AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved TE_PLAYERATTACHMENT and pev_frame(rate) (https://forums.alliedmods.net/showthread.php?t=313176)

RaZ_HU 12-30-2018 13:22

TE_PLAYERATTACHMENT and pev_frame(rate)
 
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.

E1_531G 12-30-2018 15:41

Re: TE_PLAYERATTACHMENT and pev_frame(rate)
 
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.

RaZ_HU 12-31-2018 02:50

Re: TE_PLAYERATTACHMENT and pev_frame(rate)
 
Thank you for the info.


All times are GMT -4. The time now is 07:29.

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