Comment on page

Forged

Fires when a Player upgrades an item in the Forge.
Example usage:
Events.Forged(function(event)
if (event.upgrade == ForgeUpgrade.SCYTHE) then
-- Give the player the Life Steal effect if they forge a Scythe upgrade
StatusEffectService.giveEffect(event.player:getEntity(), StatusEffect.LIFE_STEAL_3)
-- Give the player a Sky Scythe item if they don't already have one
local currentAmount = InventoryService.getAmount(event.player, ItemType.SKY_SCYTHE)
if (currentAmount == 0) then
InventoryService.giveItem(event.player, ItemType.SKY_SCYTHE, 1, false)
end
end
end)

Parameters

player: Player​

The player who forged the upgrade.

upgrade: ForgeUpgrade​

Type of upgrade researched by the player.

level: number

The level of upgrade forged by the player.
​