[PLUGIN] Get value of URL Parameter

Forum Home Forum Home > Construct 2 Development > Plugins for Construct 2
 Post Reply Post Reply
Author
2,289 Rep
Post Options Post Options   Quote Ubivis Quote  Post ReplyReply Direct Link To This Post Topic: [PLUGIN] Get value of URL Parameter
    Posted: 15 Mar 2012 at 4:31pm
UbiGetURL

This is my very first Plugin, so please nice to me :)

This plugin adds the feature to get variables values passed on with the link.

Steps of using:
1. Add the new "UbiGetParams" Object.
2. Using "Action:ParamGet" to tell which parameter you like to read
3. get the requested value by accessing "UbiGetParams.ParamValue"

I do hope someone find this as useful as I do :)


Example:
You call your Game with the URL:
"index.html?access=fb&player=123456"

you can set the action: "ParamGet" to "player" and it will returns the value "123456"

Edited by Ubivis - 15 Mar 2012 at 4:32pm
Back to Top
1,489 Rep
Post Options Post Options   Quote DalekAddison Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 2012 at 5:29pm
Thanks Ubivis! That plugin works really well. It also works without having to export the project, which is a great help for testing. This is of great help to me and I'm sure others will find it useful too!

Thanks!
Back to Top
4,019 Rep
Post Options Post Options   Quote PixelRebirth Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 2012 at 6:46pm
I made a plugin like this already a while ago:
Query String

Also, in the meantime, Construct is able to do this with the browser object anyway, so no additional plugin is actually required.

Still cool that you made a plugin, of course!
Back to Top
2,289 Rep
Post Options Post Options   Quote Ubivis Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 2012 at 6:54pm
oh, okay... have not seen both :)

But I am happy anyway that I managed it to get my version running. Hope I learned enough from developing this one to work on something else :)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down