Get Windows Username?

Get help using Construct 2

Post » Mon Sep 03, 2012 8:27 pm

I'm creating a horror game, and I want it to get the name of the player at the end of the game, just to freak the player out (ex. If the player's name was Tom, after the character died, I want it to say, "Goodnight, Tom."). I figure the only way to do this is by getting the name of the user logged into the OS. Is there any way to do this in Construct 2? And if not, is it possible by editing the HTML of my project after I export it? Thanks in advance.
B
13
S
2
G
1
Posts: 14
Reputation: 1,111

Post » Mon Sep 03, 2012 8:45 pm

[Quote]The characters in post above are fictitious and any resemblance to persons living or dead is purely coincidental[/Quote]
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Mon Sep 03, 2012 8:46 pm

@awesome8x
A server can access the client username through an environment variable. You'd need to do this on the server side i.e. externally to C2. But you could write a plugin to pull it into C2.
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Mon Sep 03, 2012 8:50 pm

@Velojet OK. Thanks!
B
13
S
2
G
1
Posts: 14
Reputation: 1,111


Return to How do I....?

Who is online

Users browsing this forum: djcrazypants, marekmk and 6 guests