External hyperlinks links to scenes

Hi,

Is there any way to make an external hyperlink to a scene? eg I have a game with multiple scenes. I create a link in my webpage that opens the game at one of those scenes, rather than the default start scene. I’m thinking I could do it by having a login and checkpoints but it would be handy to be able to just direct users to a specific scene, via an external link.

Not out of the box, because you cannot pass a URL thread to the game itself. The HTML page is just a holder for the game code, the game code is rendered by Pixi.JS and doesn’t listen for anything from the HTML page as far as I know.

You might be able to add some kind of listener via Javascript, but I can’t find anything that would indicate it will look at the referrer URL or anything.

Thank you. I suspected it wasn’t possible, but I wanted to put it out there just in case!

runtimeScene.getVariables().get("targetScene").setString(window.location.hash.substring(1));
http://exemple.com/#scene2
http://exemple.com/#scene3

Ok - thank you! I will give this a go! I did a bit of a hack experiment this morning. Using the URLTools extension, I set a condition to change the scene based on the game URL, then made multiple index.html files in the game folder and named them scene1.html, scene2.html etc, and then the link goes to scene1.html and the scene changes. Yours looks like a proper solution though :slight_smile: thank you again.