UWP Displaying GamerTags?

E

eyethree

Guest
Hi, all!

I've recently been working on porting an older 1.4 game of mine over to GMS2, and everything was going smoothly up until a couple of days ago.

The game I'm working on is targeted for Windows 10 and Xbox One UWP (Creators Collection). I've tested the game and everything runs smooth enough on console... well, that is until I needed to add Xbox Live functionality.

It isn't the basic implementation of the Xbox Live functionality itself, but displaying a GamerTag.

I've followed the directions on the "Adding Xbox Live Support to your UWP Projects" to a tee, and all other steps have been executed, but I cannot figure out how to display a GamerTag with the included functions. The code snippets in that article reference a couple of functions that are new in GMS2, specific to Xbox Live.

Here's the code listed in that article, for those unfamiliar:
Code:
var _type = async_load[? "event_type"];
switch(_type)
{
case "user signed in": 
    global.PlayerTag = xboxlive_gamertag_for_user();
    break;
case "user sign in failed":
case "user_signed_out":
    xboxlive_show_account_picker();
    // Pause the game if required
    break;
}
This code would lead me to believe that I could reference that 'global.PlayerTag' variable to draw a string of text, but I have been overworked these past few weeks and my brain is somewhat fried.

Any help is greatly appreciated!

GMS2 2.1.3.273
Runtime 2.1.3.189
 
E

eyethree

Guest
Been trying to draw a string using the global.PlayerTag variable, but nothing shows. I've tested it with other strings and it works, but for some reason, the PlayerTag variable returns nothing.

Any suggestions?
 
Top