A Creative Device forged on Verse Island
Inkbeard's Tide Race Bell
forged by snagcaptain ✓ compiles
◈ Forged at Inkbeard's Cartography Table
III
✓
Compiles
Inkbeard's Tide Race Bell
Combines the Team Settings And Inventory Device · Combines the Creative Device
2 devices
inkbeard says“Ahoy! I've rigged the tide bell and the anchor point to race each other, and that's the trick to concurrency, lad — two things ticking at once, and whichever finishes first wins. Ring the bell to wake the storm's clock, then dash for the anchor before time runs dry; every enemy your crew fells along the way buys three precious seconds, because a sea battle and a footrace can happen at the same time. Win enough tides in a row and the clock gets meaner each time, but lose three in a row and the storm wrecks the ship — sending your whole crew back to the dock to try again. Watch the HUD close, it'll tell you exactly how the race stands.”
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 messages, spoken on the tide bell's HUD ---
WelcomeMsg<localizes>() : message = "⚓ Ring the tide bell to start a race against the storm!"
RaceStartMsg<localizes>(Seconds : int) : message = "🔔 The bell tolls! Reach the anchor point in {Seconds}s before the tide swallows the ship!"
AnchorWonMsg<localizes>(Tides : int, NextSeconds : int) : message = "⛵ Anchor reached! Tides survived: {Tides}. Next tide gives you {NextSeconds}s!"
StormWonMsg<localizes>(Failures : int) : message = "🌊 The storm caught the ship! Failed tides in a row: {Failures}."
BonusTimeMsg<localizes>() : message = "⚔️ Sea monster felled! +3 seconds on the clock!"
ShipwreckMsg<localizes>(Tides : int) : message = "💥 Three storms in a row wrecked the ship! You reached {Tides} tides this run. Resetting to the dock..."
NoRaceMsg<localizes>() : message = "The anchor sits quiet - ring the bell first to start a tide race!"
# Inkbeard's Tide Race
# A concurrency lesson: ring the bell to start a race between the crew (running to
# the anchor) and the storm's countdown clock. Downing enemies while racing buys
# bonus seconds - two things happening at once, exactly the way Inkbeard likes it.
tide_race_manager := class(creative_device):
# The crew's team - tracks who is racing, who falls, and who runs out of respawns
@editable
Crew : team_settings_and_inventory_device = team_settings_and_inventory_device{}
# Ring this to start a tide race
@editable
BellTrigger : trigger_device = trigger_device{}
# Reach this before the storm clock hits zero to win the tide
@editable
AnchorTrigger : trigger_device = trigger_device{}
# Shows the crew their progress, warnings, and results
@editable
TideMessage : hud_message_device = hud_message_device{}
# How many tides the crew has survived in a row (the score)
var TidesSurvived : int = 0
# Seconds the crew gets once the bell rings. Shrinks after every win (floor of 8).
var GraceSeconds : int = 20
# Seconds left in the current tide race - ticks down every second, can be topped up
var RemainingSeconds : int = 0
# True while a tide race is underway (blocks the bell from starting a second race)
var RaceActive : logic = false
# How many tides in a row the storm has won
var StormFailures : int = 0
OnBegin<override>()<suspends>:void=
# Ring the bell to begin a tide race
BellTrigger.TriggeredEvent.Subscribe(OnBellRung)
# Reaching the anchor outside of a race is a harmless no-op ping
AnchorTrigger.TriggeredEvent.Subscribe(OnAnchorPinged)
# Felling an enemy while racing buys the crew extra seconds
Crew.EnemyEliminatedEvent.Subscribe(OnEnemyFelled)
# If the whole crew runs out of respawns, the storm claims the ship instantly
Crew.TeamOutOfRespawnsEvent.Subscribe(OnCrewWipedOut)
TideMessage.SetText(WelcomeMsg())
TideMessage.Show()
# Bell rung -> start a new tide race if one isn't already underway
OnBellRung(MaybeAgent : ?agent):void=
if (RaceActive? = false):
set RaceActive = true
set RemainingSeconds = GraceSeconds
TideMessage.Show(RaceStartMsg(GraceSeconds))
spawn{ RunTideRace() }
# The heart of the lesson: two concurrent tasks race each other.
# Whichever finishes first decides the outcome, and the other is cancelled.
RunTideRace()<suspends>:void=
race:
block:
# Task A: wait for a sailor to reach the anchor point
AnchorTrigger.TriggeredEvent.Await()
OnAnchorWon()
block:
# Task B: the storm's countdown clock
CountdownStorm()
# Ticks the storm clock down a second at a time, so OnEnemyFelled can add bonus
# time to RemainingSeconds mid-race without restarting the countdown.
CountdownStorm()<suspends>:void=
loop:
if (RemainingSeconds <= 0):
break
Sleep(1.0)
set RemainingSeconds -= 1
OnStormWon()
# The crew made it to safe harbor before the storm caught them
OnAnchorWon():void=
set RaceActive = false
set StormFailures = 0
set TidesSurvived += 1
# Escalate: each win shaves seconds off the next tide, floor of 8
if (GraceSeconds > 8):
set GraceSeconds -= 2
TideMessage.Show(AnchorWonMsg(TidesSurvived, GraceSeconds))
# The storm's clock hit zero before the anchor was reached
OnStormWon():void=
if (RaceActive?):
set RaceActive = false
set StormFailures += 1
TideMessage.Show(StormWonMsg(StormFailures))
if (StormFailures >= 3):
# Three failed tides in a row wrecks the ship - reset and send the crew home
WreckTheShip()
# An enemy felled mid-race buys the crew a few precious seconds
OnEnemyFelled(Agent : agent):void=
if (RaceActive?):
set RemainingSeconds += 3
TideMessage.Show(Agent, BonusTimeMsg())
# The whole crew running out of respawns is treated like an instant shipwreck
OnCrewWipedOut(Ignored : tuple()):void=
WreckTheShip()
# Reset the run's score and send every surviving crew member back to a spawner
WreckTheShip():void=
TideMessage.Show(ShipwreckMsg(TidesSurvived))
set TidesSurvived = 0
set GraceSeconds = 20
set StormFailures = 0
set RaceActive = false
for (Member : Crew.GetTeamMembers()):
if (MemberPlayer := player[Member]):
Crew.RespawnAtPlayerSpawner(MemberPlayer)
# Anchor triggered while no race is active - just a quiet reminder to ring the bell
OnAnchorPinged(MaybeAgent : ?agent):void=
if (RaceActive? = false):
TideMessage.Show(NoRaceMsg())
🌴 Forge your own free at verseisland.com — code XX4BP23, credits for us both
🧭 Join with XX4BP23 — you both earn starter coconuts
🌴 Forged on Verse Island — free UEFN/Verse learning + a keeper’s Combine Lab.