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:
- 1.0.1 - Initial Release
- 1.0.2 - Timer Optimization
- 1.0.3 - Normal Leveling (produces random difference from the walls to prevent texture overlapping)
- 1.0.4 - Removes y_iterate and blood limit.
- 1.0.5 - Return value in ONWS to allow damage.
__________________________________________________ __________________________________________________
Requirements:
- ColAndreas thanks to Pottus, Chris, and Slice (ColAndreas is the center of this FS).
- Streamer, thanks to Incognito (using streamer since bullets shoot fast, there will be hundreds of blood objects).
- FloatRand, thanks to Y-Less (better than my float random function).
- *Removed*y_iterate, thanks to Y-Less (using y_iterate to handle the streamer ID's so we don't need gigantic, inefficient methods).
__________________________________________________ __________________________________________________
Bugs, Concerns, and Questions:
- Streaming based on player movement will make it look weird. To fix, change the streamer update mode in your gamemode.
- The ColAndreas world is based on YOUR world. For this script to work you need to have a world to begin with, if you use the San Andreas map (of course most of you do) just do CA_Init in your gamemode.
- The blood isn't showing sometimes? It's random. It's a 5 out of 11 chance of being splattered. And as noted in the description, those 5 chances represent distances (if it's a 1, the blood will only splatter 1 unit away; 5, 5 units; and all those in between).
__________________________________________________ __________________________________________________
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
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
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
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.