GameMaker Studio · GML
Rewards
Claimable rewards (daily, weekly, per event). You define them in your panel and the player claims them from the game.
Reward Status
List your rewards with their claimable state and read rewards_status_loaded.
gmda_getRewardsStatus(); // -> rewards_status_loaded# rewards: Array, each reward you defined in the panel:
{
"key": String, # pass this to claim_reward()
"display_name": String,
"cadence_type": String, # e.g. "daily", "weekly"
"claimable_now": bool,
"next_claimable_at": String, # ISO date, or null
"payload_keys": Array
}Claiming
Claim a reward by key and read reward_claimed. The payload is in the event.
gmda_claimReward("daily_login"); // -> reward_claimed// reward_claimed -> e.response carries the claim result with the
// reward payload you defined in the panel, e.g.:
{ "coins": 100, "skin": "gold" }
// on failure e.error explains why: "cooldown", "already_claimed_period", ...