A Creative Device forged on Verse Island
Inkbeard's Tide Bell & Storm Hearth
forged by RinEllaSky ✓ compiles
◈ Forged at Inkbeard's Cartography Table
III
✓
Compiles
Inkbeard's Tide Bell & Storm Hearth
Combines the Campfire Device · Combines the Trigger Device
inkbeard says“Arr, here's a proper lesson in concurrency, forged for you: ring the Bell Trigger and it snuffs out the campfire and starts a RACE between two things happening at once — a countdown clock and your crew scrambling to relight the flame. Relight the fire before the grace period runs out and you survive the tide, your streak grows, and the NEXT tide gets a shorter fuse — miss it, and the storm resets you back to zero with a full grace period again. Keep your sailors near the fire between rings too, since I'm tracking who's huddled in its warmth versus who's out in the cold. This is the real trick of async work, lad — two paths running side by side, and whichever finishes first writes the story.”
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Game }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Inkbeard's Tide Race
# A concurrency game: ring the bell to summon a tide, then race the clock
# to relight the campfire before the storm overwhelms the ship.
inkbeards_tide_race := class(creative_device):
# The ship's hearth - must stay lit to survive each tide
@editable
Campfire : campfire_device = campfire_device{}
# The tide bell - ring it (interact) to summon the next surge
@editable
BellTrigger : trigger_device = trigger_device{}
# How many tides the crew has survived in a row
var TidesSurvived : int = 0
# How long the crew has to relight the fire before the storm wins
# This shrinks as the crew succeeds, escalating the challenge
var GraceSeconds : float = 8.0
# How many sailors are currently huddled in the campfire's warmth
var CrewInWarmth : int = 0
# True while a tide race is currently underway (prevents overlapping tides)
var StormActive : logic = false
OnBegin<override>()<suspends>:void=
# Track the crew's warmth as they move in and out of the firelight
Campfire.AgentEntersEffectAreaEvent.Subscribe(OnSailorWarms)
Campfire.AgentExitsEffectAreaEvent.Subscribe(OnSailorChills)
Campfire.AgentPulsedEvent.Subscribe(OnPulseWarmed)
Campfire.LitEvent.Subscribe(OnFireLit)
Campfire.ExtinguishedEvent.Subscribe(OnFireOut)
# The bell can be rung as many times as the crew dares
BellTrigger.SetMaxTriggerCount(0)
BellTrigger.TriggeredEvent.Subscribe(OnBellRung)
Print("Inkbeard's Tide Race is charted. Light the campfire, then ring the bell to summon the first tide.")
# --- Campfire feedback handlers ---
OnSailorWarms(Agent : agent) : void=
set CrewInWarmth += 1
Print("A sailor huddles by the fire. Crew in warmth: {CrewInWarmth}")
OnSailorChills(Agent : agent) : void=
if (CrewInWarmth > 0):
set CrewInWarmth -= 1
Print("A sailor steps into the cold. Crew in warmth: {CrewInWarmth}")
OnPulseWarmed(Agent : agent) : void=
Print("The fire's pulse warms a sailor - the crew endures another beat.")
OnFireLit(Agent : agent) : void=
Print("The fire roars back to life!")
OnFireOut(Agent : agent) : void=
Print("The fire has gone dark...")
# --- The bell + the race ---
OnBellRung(MaybeAgent : ?agent) : void=
if (StormActive?):
Print("The tide is already surging - wait for it to pass before ringing again!")
else:
spawn{RunTideSequence(MaybeAgent)}
# This is the heart of the concurrency lesson: two things race each other.
# Branch A counts down the grace period (the storm's clock).
# Branch B waits for the campfire to be relit (the crew's response).
# Whichever happens FIRST wins the race and decides the outcome.
RunTideSequence(MaybeAgent : ?agent)<suspends>:void=
if (Ringer := MaybeAgent?):
set StormActive = true
Print("The bell tolls! A tide surges toward the ship - relight the fire before the grace period ends!")
Campfire.Extinguish(Ringer)
race:
block:
Sleep(GraceSeconds)
HandleStormOverwhelms()
block:
Campfire.LitEvent.Await()
HandleTideSurvived()
set StormActive = false
HandleStormOverwhelms() : void=
set TidesSurvived = 0
set GraceSeconds = 8.0
Print("The storm overwhelms the ship! Tides survived resets to 0. Grace restored to {GraceSeconds} seconds - light the fire again!")
HandleTideSurvived() : void=
set TidesSurvived += 1
NewGrace : float = GraceSeconds - 0.75
if (NewGrace > 2.5):
set GraceSeconds = NewGrace
else:
set GraceSeconds = 2.5
Print("The crew relit the fire in time! Tides survived: {TidesSurvived}. Next grace period: {GraceSeconds} seconds.")
🌴 Forge your own free at verseisland.com — code G4EFENS, credits for us both
🧭 Join with G4EFENS — you both earn starter coconuts
🌴 Forged on Verse Island — free UEFN/Verse learning + a keeper’s Combine Lab.