How do add variables in the browser redirect

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • When a user goes to a page where the game are to be played he gets an unique ID that I save in a hidden field.

    When the game is finished I would like to redirect the browser to another page. Something like this:


    I need to be able to:

    1. Get the unique ID that is in the web page

    2. Get the score that are in the game

    Thank you

  • For the redirection you should be able to use the browser built-in plugin and its "Go to url" action.

    You can concatenate strings and global variables.

    Ex: "..../GameSummary?UniqueID=" & UniqueIDValue & "&score=" & Score

    Where UniqueIDValue and Score are both global variables.

    There's no "official" way to get the value of an hidden field in the page (but you could use a third-part plugin to retrieve it and store it in the UniqueIDValue global variable).

    You could also use the Browser's plugin action "QueryParam" and/or "QueryString" to retrieve values directly from the URL.

    I hope this helps.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you. I sure have to look into this a little more. I got it to work using the browser plugin. But posting score like this will result in my game beeing really easy to cheat in.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)