URL Paramenter to Value

I would like to set a value of already-defined variable from a URL parameter.
URL parameters comes after website (game in this case) url and both get separated by ?, something like
example.com/index.html?Variable=Value

Is this possible?

So are you trying to implement a website into your game I tried it too using URL extension on gdevelop and it worked but for some reason not when exported

Nope.

Let’s say you created a lobby (not related to the new feature Multiplayer). The game generated a link to let you friends join the lobby directly, something like: mygdevelopgame.com/index.html?lobby=1234569.

I want to make my game reads the value of lobby, the parameter in the URL.

Out of the box, there’s nothing that’s going to read the browser URL page from within the game.

For the most part GDevelop games do not know anything about the browser. That said, you could use the Webpage URL tools extension which has some events that reads the browser details.

You will probably need to do some string manipulation on whatever it’s spat out, but that’ll be a good starting place.

1 Like