Add a variable to a Browser Object URL link

Get help using Construct 2

Post » Fri Feb 21, 2014 12:21 am

Hi
[I've had a good look around the tutorials and forums but not been able to find an answer to this].

Does anybody know how to add a variable to a URL when using the Browser Object Go To Action?

I basically want to add a users score to a pre-populated Twitter URL Twitter list. So it would be something like this

https://twitter.com/intent/tweet?text=Here+is+my+SCORE

Where SCORE is the users variable score from the game itself.

Any tips?

Thanks

RabbitStu
B
3
Posts: 3
Reputation: 205

Post » Fri Feb 21, 2014 4:01 am

Try something like:

"https://twitter.com/intent/tweet?text=Here+is+my+Score:+" & SCORE

The '&' operator joins 2 variables or text together.

if SCORE is 1337, the concatenated text will be: "https://twitter.com/intent/tweet?text=Here+is+my+Score:+1337"
B
163
S
120
G
9732
Posts: 42
Reputation: 4,875,331

Post » Fri Feb 21, 2014 5:04 pm

Hi Aruche

Yes, that did it! :) thanks for the help.
B
3
Posts: 3
Reputation: 205


Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION, tarek2 and 17 guests