Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Naymmmm opened this issue Sep 5, 2024 · 1 comment
Open

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

Naymmmm opened this issue Sep 5, 2024 · 1 comment

Comments

@Naymmmm
Copy link

Naymmmm commented Sep 5, 2024

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}
})
@rotntake
Copy link
Owner

There isn't really any relative between the RandomOffset and the Filter, could you try maybe using VitimaHuman.Parent:GetChildren()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants