SA-MP Forums Archive
[FilterScript] Blood splatter from gunshots! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Blood splatter from gunshots! (/showthread.php?tid=602407)

Pages: 1 2


Blood splatter from gunshots! - Crayder - 06.03.2016

Blood Splatter!

This script will change gunshots forever. Using ColAndreas and some simple math this script will splatter blood in the direction of the gunshots. The distance varies between 0 and 5. When the distance is 0 the blood will obviously go no where. When it is 1 - 5 it will splatter on any wall beyond the player being shot. The blood fades away within 2 seconds after it is splattered.
__________________________________________________ __________________________________________________

Screenshots:




__________________________________________________ __________________________________________________

Changelog:
__________________________________________________ __________________________________________________

Requirements:
__________________________________________________ __________________________________________________

Bugs, Concerns, and Questions:
__________________________________________________ __________________________________________________

BloodSplatter 1.0.5


Re: Blood splatter from gunshots! - Crystallize - 06.03.2016

Yet an amazing release from you crayder , that's a great use of ColAndreas.


Re: Blood splatter from gunshots! - Pottus - 06.03.2016

You can do this without the need for any variables at all actually do it like this.

Code:
forward FadeBlood(objectid, alpha, time);
public FadeBlood(objectid, alpha, time)
{
    alpha -= 5;
    if(alpha) {
        SetDynamicObjectMaterial(objectid, 0, -1, "none", "none", 0xFF0000 | (alpha << 24));
        SetTimerEx("FadeBlood", time, false, "iii", objectid, alpha, time);
    }
	else {
        DestroyDynamicObject(objectid);
    }
}



Re: Blood splatter from gunshots! - Stones - 06.03.2016

Oh wow, nice one mate, i'll be using this


Re: Blood splatter from gunshots! - Crayder - 06.03.2016

Quote:
Originally Posted by Pottus
View Post
You can do this without the need for any variables at all actually do it like this.

Code:
forward FadeBlood(objectid, alpha, time);
public FadeBlood(objectid, alpha, time)
{
    alpha -= 5;
    if(alpha) {
        SetDynamicObjectMaterial(objectid, 0, -1, "none", "none", 0xFF0000 | (alpha << 24));
        SetTimerEx("FadeBlood", time, false, "iii", objectid, alpha, time);
    }
	else {
        DestroyDynamicObject(objectid);
    }
}
Yeah but what's the harm in two variables in a super small filterscript...?

Still no problem, will do (edit; done in 1.0.1).

__________________________


v1.0.2: Normal leveling to prevent texture overlapping.


Re: Blood splatter from gunshots! - CounterTDM - 06.03.2016

Excellent, I will definitely be implementing this. Thanks!


Re: Blood splatter from gunshots! - Pottus - 06.03.2016

Well you really don't need the iterator or any variables actually just supply the object id instead of index.


Re: Blood splatter from gunshots! - Crayder - 06.03.2016

Quote:
Originally Posted by Pottus
View Post
Well you really don't need the iterator or any variables actually just supply the object id instead of index.
The point of the iterator is to limit the number of blood objects there can be.


Re: Blood splatter from gunshots! - Pottus - 06.03.2016

You don't need to worry about limiting them though since they disappear pretty quickly.


Re: Blood splatter from gunshots! - Crayder - 06.03.2016

Quote:
Originally Posted by Pottus
View Post
You don't need to worry about limiting them though since they disappear pretty quickly.
Point taken. I have a feeling a lot of people are going to complain about ackslimit crashes...

I'm going to make them stay solid for a second before fading too. Like the ones in GTA (the ones that go on the ground when you are shot).


Re: Blood splatter from gunshots! - DEATHSTROKE - 06.03.2016

Awesome FS !!!


Re: Blood splatter from gunshots! - Amunra - 07.03.2016

Awesome Man
I'll Using This ... Very Nice !!


Re: Blood splatter from gunshots! - MicroKyrr - 07.03.2016

Not bad , not good , it's great. Great job


Re: Blood splatter from gunshots! - Karan007 - 11.03.2016

Great.


Re: Blood splatter from gunshots! - HydraHumza - 11.03.2016

Awesome. Nice work Crayder


Re: Blood splatter from gunshots! - Logic_ - 11.03.2016

What the........ Amazing..... Amazing work. Thanks Crayder... +REP.


Re: Blood splatter from gunshots! - Arithmetic - 11.03.2016

Creative.


Re: Blood splatter from gunshots! - VenusDarkX - 11.03.2016

Very nice!!!


Re: Blood splatter from gunshots! - Glossy42O - 12.03.2016

looks cool,


Re: Blood splatter from gunshots! - JamalMaddox - 12.03.2016

Great job.