So I’ve created a puddle system from scratch, I tend to make simulations and algorithms that power simulations. Some of my Community Resources Concerning this are here.
This is not just a blood system this is a puddle system. By rounding the droplets position using grid logic this algorithm grows puddles on the ground. By Raycasting It covers the limbs of characters the particle touches. If you step on a puddle you have footprints.
There are 4 Example settings in this, Blood, Mud, Honey, and Green Slime.
You can easily create your own by just copying and customizing these textures and particles in a directory.
Additionally, there is a waterfall feature in there for creating waterfalls. But I don’t know if it will be so useful.
Here is the module!
Instructions :
To use this module locally you would run it like this to do the blood effect.
require(game.ReplicatedStorage.PuddleSystem).Initialize().OnDamaged(game.Players.LocalPlayer.Character)
To make a dripper you could just easily clone this object or run the code inside the actor.
This code is very performant. Let me know what you think!
This is a unplanned release so in time I will try to post some screenshots illustrating the features.
Something you would want to consider is this function;
local function updateparams()
if paramsupdate then
paramsupdate=false
params = RaycastParams.new()
params.FilterDescendantsInstances = {workspace.Terrain,game.CollectionService:GetTagged("floorunion")}
params.FilterType = Enum.RaycastFilterType.Include
params.IgnoreWater = false
task.delay(10,function()
paramsupdate=true
end)
end
return params
end
In my project I use terrain and blocks tagged floorunion to determine when someone is inside of a building. So I was able to use it for my raycast parameters which includes the terrain and objects with that tag. So you can consider changing that to something more suitable.
Each dripper object has a configurable puddle size, as demonstrated by the configured objects.
local PuddleSys=game.ReplicatedStorage.PuddleSystem
local Puddle=require(PuddleSys).Initialize()
-- Example usage:
local basePart = script.Parent.Parent
local dripInterval = 2 -- Drip every 2 seconds
local puddleSize = Vector3.new(1,.02,1)
local puddleTemplate =nil-- script:WaitForChild("PuddleTemplate")
local PBR =nil --script:WaitForChild("PBR")
local Library=PuddleSys.Slime
Puddle.Set.PBR(Library.Textures)
Puddle.Set.CharacterTextures(Library.Textures)
Puddle.Set.Particles(Library.Puddle)
Puddle.Settings.Part(Library.PuddlePart)
Puddle.Settings.Tolerance(8)
Puddle.Settings.PuddleSize(12)
Puddle.Settings.DestroyDelay(18)
Puddle.Drip(basePart, dripInterval, puddleSize)
If you find the setup confusing try using a copy of this place file!