Raised This Month: $12 Target: $400
 3% 

Solved Fire sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 06-06-2020 , 13:22   Fire sprite
Reply With Quote #1

We have the following sprite with such parameters



And its function
PHP Code:
public fire()
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byteTE_FIREFIELD );
    
engfuncEngFunc_WriteCoordOriginC4] );
    
engfuncEngFunc_WriteCoordOriginC4] );
    
engfuncEngFunc_WriteCoordOriginC4] += 35.0 );
    
write_short);
    
write_shortg_FireSprites );
    
write_byte);
    
write_byteTEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA );
    
write_byte20 ); 
    
message_end();

Why in the game do I see him on a black background?
I tried to redo the sprite with different formats ... no sense.
Maybe this is due to the number of frames, instead of one? (Delirium)

What is needed or is everything right?
PHP Code:
    write_byteTEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA ); 

Last edited by MayroN; 06-06-2020 at 19:41.
MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
Vieni
Member
Join Date: Apr 2018
Old 06-07-2020 , 09:39   Re: Fire sprite
Reply With Quote #2

When you edited the sprite, did you rename it to something else? As this the new would be downloaded.

If you did so, I'd suggest to try recreating it as "vp_parallel", if ain't working, set the format to indexalpha, maxbe the black ain't the needed black, so the first pixels will be picked to set the transparency.

If still not working, I'd play with the flags:
HTML Code:
TEFIRE_FLAG_ALLFLOAT        1        // All sprites will drift upwards as they animate
TEFIRE_FLAG_SOMEFLOAT       2        // Some of the sprites will drift upwards. (50% chance)
TEFIRE_FLAG_LOOP            4        // If set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration.
TEFIRE_FLAG_ALPHA           8        // If set, sprite is rendered alpha blended at 50% else, opaque
TEFIRE_FLAG_PLANAR          16       // If set, all fire sprites have same initial Z instead of randomly filling a cube.
Vieni is offline
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 06-07-2020 , 19:54   Re: Fire sprite
Reply With Quote #3

Quote:
Originally Posted by Vieni View Post
When you edited the sprite, did you rename it to something else? As this the new would be downloaded.

If you did so, I'd suggest to try recreating it as "vp_parallel", if ain't working, set the format to indexalpha, maxbe the black ain't the needed black, so the first pixels will be picked to set the transparency.

If still not working, I'd play with the flags:
HTML Code:
TEFIRE_FLAG_ALLFLOAT        1        // All sprites will drift upwards as they animate
TEFIRE_FLAG_SOMEFLOAT       2        // Some of the sprites will drift upwards. (50% chance)
TEFIRE_FLAG_LOOP            4        // If set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration.
TEFIRE_FLAG_ALPHA           8        // If set, sprite is rendered alpha blended at 50% else, opaque
TEFIRE_FLAG_PLANAR          16       // If set, all fire sprites have same initial Z instead of randomly filling a cube.
It was necessary to change everything

PHP Code:
write_byteTEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA ); 
>>>>
PHP Code:
write_byte50 ); 
Above 50 - black background
MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
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 04:38.


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