Effectify v1.2.0 - A Customizable Status Effect Implementation

Added in this update are the global signal and GetEffect functions.
An example is the Wet Effect in the Effect Library.
This Wet Effect has the effect of deactivating the Fire effect.

Wet = {
		Function = function(Params: TypeCheck.Properties)
			local effectify = require(script.Parent)
			if effectify.IsActive(Params.Owner, "Fire") then --Check if the character has a fire effect
				for _, e in pairs(effectify.GetEffects(Params.Owner, "Fire")) do --Gets the fire effect that the character has.
					if e.EffectType == "Fire" then
						e:Deactivate()
					end
				end
			end
			
			effectify.ActivatedSignal:Connect(function(effect: TypeCheck.Properties) --Global signal
				if not Params.Active then return end
				if effect.EffectType == "Fire" and effect.Owner == Params.Owner then
					effect:Deactivate()
				end
			end)
		end,
	},
1 Like