Blood Engine - A droplet emitter system

The splatters get ridiculously big when Expansion is true.
I already put the issue on GitHub too.

Hi,
Is there a newer .rbxl file or EDITable demo place?

Thanks

Did you you change the MaximumSize to a higher value? Send me the applied settings as this doesn’t give much information.

local Engine = BloodEngine.new({
	Limit = 100, -- Sets the maximum number of droplets that can be created.
	Type = "Decal", -- Defines the droplet type. It can be either "Default" (Sphere) or "Decal",
	RandomOffset = false, -- Determines whether a droplet should spawn at a random offset from a given position.
	OffsetRange = {-20, 10}, -- Specifies the offset range for the position vectors.
	DropletVelocity = {1, 2}, -- Controls the velocity of the emitted droplet.
	DropletDelay = {0.05, 0.1}, -- Sets the delay between emitting droplets in a loop (for the EmitAmount method).
	StartingSize = Vector3.new(0.01, 0.7, 0.01), -- Sets the initial size of the droplets upon landing.
	Expansion = true, -- Determines whether a pool can expand when a droplet lands on it.
	MaximumSize = 0.9, -- Sets the maximum size a pool can reach.
})
4 Likes

This module is amazing although it would be even more amazing if I was able to alter some settings such as “DropletVelocity” for specific things. I did notice that you are able to use the UpdateSettings() function although I assume that would change the settings for every single blood droplet as well which isn’t really what I was looking for.

1 Like

Super high quality, thank you so much

Can you explain what you’re trying to do further?

I’m having the same issue where the droplets do not follow the target, I’m using the blood via clientside and providing the arguments via remote events to replicate from server to client.

Client code:

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Replicated = game:GetService('ReplicatedStorage')
local BloodM = require(script.LiquidEngine)
local ReplicateBlood = Replicated:WaitForChild('Events').BloodReplicator
local NewestEngine

ReplicateBlood.OnClientEvent:Connect(function(Table, EmitCount, Parent, Direction)
	NewestEngine = BloodM.new(Table)
	NewestEngine:EmitAmount(Parent, Direction, EmitCount)
end)

Server code:

local Shared = require(game.ReplicatedStorage.Modules.Shared.SharedFunctions)
local Character = Shared:GetTargetByMouse(Player, 5, 50)
local BloodTable = {
	Limit = 155, -- Sets the maximum number of droplets that can be created.
	Type = "Default", -- Defines the droplet type. It can be either "Default" (Sphere) or "Decal",
	RandomOffset = false, -- Determines whether a droplet should spawn at a random offset from a given position.
	OffsetRange = {-20, 10}, -- Specifies the offset range for the position vectors.
	DropletVelocity = {1, 2}, -- Controls the velocity of the emitted droplet.
	DropletDelay = {0.05, 0.1}, -- Sets the delay between emitting droplets in a loop (for the EmitAmount method).
	StartingSize = Vector3.new(0.01, 0.7, 0.01), -- Sets the initial size of the droplets upon landing.
	Expansion = true, -- Determines whether a pool can expand when a droplet lands on it.
	MaximumSize = 1, -- Sets the maximum size a pool can reach.
}
game.ReplicatedStorage.Events.BloodReplicator:FireAllClients(BloodTable, 25, Character['Left Leg'])
1 Like

How do I ignore the players this module is extremely good but it sucks because I can’t ignore the players and it just spawns parts inside of the player which makes it useless because I don’t want it to clip with my players…

1 Like

BloodEngine > Settings > Line 20:


Make it the folder where your character entities are stored.

2 Likes

I don’t have my players in a folder

Then you should probably do that, not saying how you should organize your game but it’s generally good practice to do so.

1 Like

How do I make it so droplets dont collide with people? it breaks the ragdoll system I have

1 Like

Make a folder for each player’s characters, each time a character is created, change the parent from Workspace to the folder you created. Make sure this is done on the server.

local Players = game:GetService("Players")
local Characters = workspace.Characters

-- Delay time because for some reason Roblox initiates an error and blalbalbl
local DelayTime = 1

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		task.wait(DelayTime)
		character.Parent = Characters
	end)
end)

After that, using the Filter option you can do this:

local BloodEngine = require(PATH_TO_BLOOD_ENGINE)
local Characters = workspace.PATH_TO_CHARACTERS_FOLDER

local Engine = BloodEngine.new({
    Filter = { Characters }
})

2 Likes

Blood Engine • v1.0.1


↳ General Changes

Bugfixes: The Pool Expansion feature had this bug where it would unexpectedly expand beyond its limit. This occurred due to a droplet interacting with a pool mid-expansion, which expands it twice as much.

3 Likes

Blood Engine • v1.0.2


↳ General Changes

Different Settings Upon Emission: You can now apply different settings to the droplets using EmitAmount or Emit instead of manually changing it.

3 Likes

Dude I can’t do this because my tools break if I put all my players into a folder, I’d have to find the player exactly and it’s too much of a hassle.

Any reason this is giving me this error?

ReplicatedStorage.BloodEngine:71: attempt to index nil with 'DropletDelay'

LocalScript:

local bloodEngine = require(game.ReplicatedStorage:WaitForChild("BloodEngine"))
local Humanoid = script.Parent:WaitForChild("Humanoid")
local OldHealth = Humanoid.Health

local Engine = bloodEngine.new({
	Limit = 100, -- Sets the maximum number of droplets that can be created.
	Type = "Decal", -- Defines the droplet type. It can be either "Default" (Sphere) or "Decal",
	RandomOffset = false, -- Determines whether a droplet should spawn at a random offset from a given position.
	OffsetRange = {-20, 10}, -- Specifies the offset range for the position vectors.
	DropletVelocity = {1, 2}, -- Controls the velocity of the emitted droplet.
	DropletDelay = {0.05, 0.1}, -- Sets the delay between emitting droplets in a loop (for the EmitAmount method).
	StartingSize = Vector3.new(0.01, 0.7, 0.01), -- Sets the initial size of the droplets upon landing.
	Expansion = true, -- Determines whether a pool can expand when a droplet lands on it.
	MaximumSize = 1, -- Sets the maximum size a pool can reach.
})

Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
	if Humanoid.Health < OldHealth then
		bloodEngine:EmitAmount(script.Parent:FindFirstChild("Torso"), nil, 10)
	end

	OldHealth = Humanoid.Health
end)
1 Like

I’ll fix this in the next patch/version.

I’ll probably make it accept functions that trigger everytime a droplet is emitted or something like that.

So it returns a table of things to be filtered, which you can use to specifically get characters in like a loop or something.

3 Likes

This is definitely the best blood module i’ve ever saw, that isn’t paid.

I wanted to thank you so much for this, this is really a lifesaver, i didn’t want to waste hours, or even days to make a simple blood module for my game.

I’m excited to see what’s coming in future updates!

3 Likes