xboxlive_agegroup_for_user


Description

This function will return one of four constants (shown below) to indicate the age-range assigned to the specified user ID pointer.

IMPORTANT! This function is only valid when exporting using the UWP target for the Xbox One and it requires you to have checked the Enable XBox Live option in the UWP Game Options.


Syntax:

xboxlive_agegroup_for_user(user_id);

Argument Description
user_id The user ID (a pointer) to check


Returns:

Constant

Constant Description
xboxlive_agegroup_unknown The age group for the user is unknown
xboxlive_agegroup_child The user age group is between 8 and 12 (inclusive)
xboxlive_agegroup_teen The user age group is between 13 and 17 (inclusive, and between 13 and 19 in South Korea)
xboxlive_agegroup_adult The user age group is 18 or over (or 20 and over in South Korea


Example:

var _age = xboxlive_agegroup_for_user(xboxlive_get_activating_user());
if _age != xboxlive_agegroup_adult
    {
    global.ContentControl = true;
    }
else global.ContentControl = false;

The above code checks the age group of the activating user and sets a global variable to true or false depending on the returned constant.