Consume Effects - Apply Effects (Function) — SkBee

Addon: SkBee · Category: Function · Since: 3.8.0

Syntax

apply_effects(potion effects: objects, probability: number)

Description

Create an 'apply_effects' consume effect. This will create a list of potion effects to be applied when consumed with a chance between 0 and 1. This can be used in a death protection/consumable component.

Examples

set {_p::1} to potion effect of night vision for 10 seconds
set {_p::2} to potion effect of slow mining for 5 seconds
set {_c} to apply_effects({_p::*}, 0.5)

View source