Skip to content

When RandomOffset is true, Engines do not respect filtering. #6

@Naymmmm

Description

@Naymmmm

Self explanatory, here's my config and the code that triggers the stuff.

local BloodEngineEngine = BloodEngine.new({
	Limit = 250, -- 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 = {-5, 4}, -- 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 = 2.5, -- Sets the maximum size a pool can reach.
})

Here's the spawning function I use;

function SpawnBlood(Origin, Direction)
	for i = 0,70 do
		task.wait(0.04)
		BloodEngineEngine:EmitAttachment(Origin, Direction) -- I have modified init.luau to support attachments, theoretically; it should not bypass filtering.
	end
end

Modified segment. (entire new function)

function BloodEngine:EmitAttachment(Origin: Attachment, Direction: Vector3, Data: Settings.Class?)
	-- Class definitions
	local Engine: Operator.Class = self.ActiveEngine
	assert(Origin:IsA("Attachment"), "[BloodEngine] What the lordy lord just happened")

	-- Variable definitions
	Direction = Direction or Functions.GetVector({ -10, 10 }) / 10

	-- Emit a single droplet
	Engine:Emit(Origin.WorldPosition, Direction, Data)
end

And the UpdateSettings() if it's relevant.

BloodEngineEngine:UpdateSettings({
	Filter = {VitimaHuman.Parent}
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions