ID:2078960
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
When sending a player to a remote world via the link() command, I'd like to be able to specify a fallback option for what happens when the connection fails.

For instance, let's say I transition the player from a single-player world to a server via link(), If the player's connection is refused, the gameplay cycle ends and DreamSeeker shows the options and messages window simply stating "connection failed."

I'd like to be able to specify a fallback on link() via an additional argument:

link(url,fallback)

The fallback will be called as a command on the client.

This means you could fall the player back to a single-player world again:

link("byond://ip:port",".url Game.dmb?action=connectionfailed&server=[url]")

Or you could fall back to a multiplayer world again:

link("byond://ip:port",".url byond://someotherip:port")

Or you could call a javascript command that would update the UI on the client-side to inform the user of connection failure:

link(byond://ip:port",".output browser:connectionfailed")

Or you could show a window that would inform the player that their connection failed:

link(byond://ip:port",".winset failwin.is-visible=true")