TPStashEvent.ChangeStat
public int ChangeStat(
string player_uuid,
string character_uuid,
string stat_slug,
int stat_to,
[string stat_category_slug=null],
[int? stat_from=null]
);
Description
ChangeStat collects the data related to the character’s stat changes. Use this method only when the player is able to change a specific stat selectively.
It returns 1 for success and -1 for failure. If -1 is returned, you can see the following message in the Unity editor console in TentuPlay debug mode:
|
Parameters
Name | Description | Required | ||
---|---|---|---|---|
player_uuid |
Player’s unique ID (not a character’s ID) such as Steam user ID and Google Play user ID |
Required |
||
character_uuid |
Player’s character’s unique lD
|
Required |
||
stat_slug |
Unique slug (similar to ID) for a stat (for example, "Strength", "Perception", "Endurance") |
Required |
||
stat_to |
Stat value as a number after the change |
Required |
||
stat_category_slug |
Unique category slug (similar to the name of the category) of stats (for example, |
Optional |
||
stat_from |
Stat value as a number before the change |
Optional |