# We need to import basic functionality from Verse
using /Fortnite.com/Devices
using /Verse.org/Simulation
# This is our main script structure. Think of it as the "Island" itself.
# It holds all the rules for this specific zone.
disguise_sensor := class(verse_event_actor):
# This is a 'Variable'. It's a container that can change.
# Here, it holds the reference to the Disguise Device we'll link later.
# We call it 'hub' because it's the central control point.
hub: DisguiseDevice = DisguiseDevice{}
# This is a 'Function'. It's a set of instructions.
# We'll call it when something interesting happens.
on_item_used := func(player: player, item: item):
# Check if the item used is a disguise type
# We use a simple check: is the item's name containing "Cardboard" or "Snowman"?
# In Verse, we can check properties. For simplicity, let's assume
# we only want to trigger on specific items.
# If the player used a disguise item...
if item.GetClass() = /Fortnite.com/Items/Consumables/DisguiseCardboardItem or
item.GetClass() = /Fortnite.com/Items/Consumables/DisguiseSnowmanItem:
# This is the 'Scene Graph' in action.
# We are telling the Disguise Device (hub) to apply a disguise to the player.
# The device handles the visual change.
hub.ApplyDisguise(player)
# Optional: Send a chat message so everyone knows someone went undercover!
Verse Library
verse
01 Standalone
Applies disguises to players when specific items are used. Ideal for social deduction mini-games.
verse-library/using-disguise-consumables-in-fortnite-creative/01-standalone.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.