Raised This Month: $32 Target: $400
 8% 

[CS:GO] Bloodspray effect doesn't work properly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 10-16-2019 , 07:22   [CS:GO] Bloodspray effect doesn't work properly
Reply With Quote #1

When I spawn the effect, it produces 3 types of particles - gore, drops and cloud. All of them are purple in CS:GO and red in CS:S.

PHP Code:
#define    FX_BLOODSPRAY_DROPS    0x01
#define    FX_BLOODSPRAY_GORE    0x02
#define    FX_BLOODSPRAY_CLOUD    0x04
#define    FX_BLOODSPRAY_ALL    0xFF

#define    BLOOD_COLOR_RED        247

public void OnMapStart()
{
    
PrecacheEffect("bloodspray");

    
PrecacheModel"sprites/blood_drop.vmt" );
    
PrecacheModel"sprites/blood_gore.vmt" );
    
PrecacheModel"sprites/blood_puff.vmt" );
}

stock TE_SetupEffect_BloodSpray(const Float:pos[3], const Float:dir[3], coloramountflags)
{    
    
TE_Start("EffectDispatch");
    
    if( 
GetEngineVersion() == Engine_CSGO )
    {
        
TE_WriteFloat("m_vOrigin.x"pos[0]);
        
TE_WriteFloat("m_vOrigin.y"pos[1]);
        
TE_WriteFloat("m_vOrigin.z"pos[2]);
    }
    else
        
TE_WriteFloatArray("m_vOrigin[0]"pos3);

    
TE_WriteVector("m_vNormal"dir);
    
TE_WriteFloat("m_flScale"float(amount));
    
TE_WriteNum("m_fFlags"flags);
    
TE_WriteNum("m_nColor"color);
    
    
TE_WriteNum("m_iEffectName"GetEffectIndex("bloodspray"));
}

stock PrecacheEffect(const String:sEffectName[])
{
    static 
table INVALID_STRING_TABLE;
    
    if (
table == INVALID_STRING_TABLE)
    {
        
table FindStringTable("EffectDispatch");
    }
    
    new 
bool:save LockStringTables(false);
    
AddToStringTable(tablesEffectName);
    
LockStringTables(save);

here is my code to spawn the effect:

PHP Code:
TE_SetupEffect_BloodSpray(damagePositiondmgforceBLOOD_COLOR_RED12FX_BLOODSPRAY_ALL);
TE_SendToAll(); 
An example of purple drops is attached below. Is there a way to make the effect particles red in CS:GO ?
Attached Images
File Type: jpg drops.jpg (86.2 KB, 149 views)

Last edited by kadet.89; 10-16-2019 at 07:27.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Reply



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 00:04.


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