Passing parameter to the game !

Get help using Construct 2

Post » Thu Feb 07, 2013 5:13 pm

Hi guys,

I have a HTML form outside of my game asking the player to enter his name / email.

When I submit the form, I load the game. I would like to know if it's possible to pass a parameter to the game when I load it...

Doing so, I will be able to save the score of the player when he finished his game.

Thanks in advance for your time.

Cheers,

J.
B
6
S
1
G
3
Posts: 9
Reputation: 2,325

Post » Thu Feb 07, 2013 5:18 pm

It would be easier to simply ask the player to enter their name/email in your game directly. Then save the info using the "webstorage" object.

justifun2013-02-07 17:18:23
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Thu Feb 07, 2013 5:21 pm

Yeah, I though about that... But the form object haven't way of validating the data. But anyway.

So I could save use the webstorage object and then push all the infos in a DB at the end of the game using AJAX.

I'm going to give it a try.

Thanks mate.
B
6
S
1
G
3
Posts: 9
Reputation: 2,325

Post » Thu Feb 07, 2013 8:53 pm

@jacquesletesson You can use the hash or query of the url to get data from outside of the app when it starts using the Brower Object
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Thu Feb 07, 2013 9:49 pm

Thanks @theubie. Exactly what I needed.
B
6
S
1
G
3
Posts: 9
Reputation: 2,325


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests