Raised This Month: $ Target: $400
 0% 

[HELP] Replace Blood Sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-13-2016 , 05:34   [HELP] Replace Blood Sprite
Reply With Quote #1

Is there any simple way to replace the default blood sprite of the blood effect that occurs when you hit the target? ( not the one splattered on the wall, but the one that's actualy like a fountain )
__________________

Last edited by Depresie; 03-13-2016 at 05:36.
Depresie is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 03-13-2016 , 07:07   Re: [HELP] Replace Blood Sprite
Reply With Quote #2

you can try hooking SVC_TEMPENTITY message

Code:
public plugin_init()
{
    ....

    register_message(SVC_TEMPENTITY, "OnMessageTempEntity");
}

public OnMessageTempEntity()
{
    if (get_msg_arg_int(1) != TE_BLOODSPRITE)
        return;

    set_msg_arg_int(5, ARG_SHORT, ....); // here comes the precached bloodspray sprite index
    set_msg_arg_int(6, ARG_SHORT, ....); // here comes the precached blood drop sprite index
}
or by hooking UTIL_BloodDrips function and overwriting it.
__________________


Last edited by NiHiLaNTh; 03-13-2016 at 07:08.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-13-2016 , 12:42   Re: [HELP] Replace Blood Sprite
Reply With Quote #3

What do you think would be the best?
__________________
Depresie is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 03-13-2016 , 13:25   Re: [HELP] Replace Blood Sprite
Reply With Quote #4

Quote:
hooking UTIL_BloodDrips function
would be better, but you need Orpheu for that. Anyway, its up to you.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-13-2016 , 14:59   Re: [HELP] Replace Blood Sprite
Reply With Quote #5

i'd like to stick without orpheu
but isn't there any way to replace these sprites on map start?
__________________
Depresie is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-13-2016 , 15:11   Re: [HELP] Replace Blood Sprite
Reply With Quote #6

Quote:
i'd like to stick without orpheu
Why?
__________________
HamletEagle is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-13-2016 , 21:41   Re: [HELP] Replace Blood Sprite
Reply With Quote #7

im trying to keep everything as basic as i can for now, since im working on a very big project, and i kind of lose track of things... Also, i don't have any experience with orpheu... I might use it later, when i get to optimizing
__________________
Depresie is offline
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 08:31.


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