Skip to content

Blood Engine • V1.1.0

Choose a tag to compare

@rotntake rotntake released this 06 Aug 21:52
· 14 commits to main since this release
428edd4

↳ General Changes

• Improvements to Emission: You can now emit mixed droplets (decal & default) without making a new emitter instance!
• Droplet Color: There's a new DropletColor setting to change the color of your droplets/pools.

↳ Other Notes

While this was a minor update, what you can do with it is anything but.
Here's a showcase to show what you can do with this new release:

d1cc8933b54b3b42df563da78f10c747.mp4

You can now do a mix of Droplets and Decals. And without creating multiple emitter instances that might eat out your performance.
Here's the code behind it:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local BloodEngine = require(ReplicatedStorage.BloodEngine)
local Engine = BloodEngine.new({
	Limit = 500,
})

local EMIT_AMOUNT = 50
local EMIT_DELAY = 5

local function Emit()
	-- A random chance of the droplet being a decal
	local IsDecal = math.random(0, 1) == 1
	
	-- Emits a droplet in a random direction relative to a part, and there's a chance that it could be a decal.
	Engine:Emit(script.Parent, nil, {
		Type = IsDecal and "Decal" or "Default",
		DefaultSize = IsDecal and { 1, 1.4 } or { 0.4, 0.7 }
	})
end

-- A custom iteration of the EmitAmount method
while true do
	for Index = 1, EMIT_AMOUNT, 1 do
		local DropletDelay = math.random(0.05, 0.1)

		Emit()
		task.wait(DropletDelay)
	end
	task.wait(EMIT_DELAY)
end