xboxlive_matchmaking_find

This function will search for a multi-player session using the Session Template, matchmaking hopper and Secure Device Association template, which you should have created beforehand in the XDP dashboard. The user ID you can retrieve for a particular game pad by calling the xboxlive_user_for_pad() function. The function will return a unique Request ID value, which can then be used to identify the correct Social Asynchronous Event for this function. This event will be triggered when the session has been created and will contain a DS Map in the variable async_load with the following key/value pairs:

 

Syntax:

xboxlive_matchmaking_find(user_id, template, hopper, sdatemplate, [matchattributes]);

ArgumentTypeDescription
user_idXbox User IDThe user ID pointer to use
templateStringThe name of the session template
hopperStringThe name of the matchmaking hopper
sdatemplateStringThe name of the secure device association template
matchattributesRealOPTIONAL The match attributes

 

Returns:

Async Request ID

 

Example:

var userID = xboxone_user_for_pad(global.PadIndex);
result = xboxone_matchmaking_find(userID, "MatchTicketSession", "MatchTicketHopper", "PeerServerTraffic");

The above will retrieve the user ID for the user on the given gamepad and then try to find a matchmaking session for them.