Daily Rewards
Daily login rewards: the game declares an ordered list of reward ids (one per day), and Bridge tracks the current day, claims, and streak resets.
Configuration
Declare the rewards in the config under the dailyRewards key:
Get Rewards
Returns the configured ordered list of reward ids.
Call the Daily Rewards Get Rewards action, then handle the On Daily Rewards Get Rewards Completed trigger. Read the result with the DailyRewardsCount and DailyRewardsReward(index) expressions, or take the whole list with DailyRewardsAsJSON.
Call the Daily Rewards Get Rewards action, then handle the On Daily Rewards Get Rewards Completed condition. Read the result with the PlaygamaBridge::DailyRewardsCount() and PlaygamaBridge::DailyRewardId(index) expressions, or take the whole list with PlaygamaBridge::DailyRewardsAsJSON().
Get Current Day
Returns the 0-based index (into the rewards list) of the reward the player is currently on.
Call the Daily Rewards Get Current Day action, then handle the On Daily Rewards Get Current Day Completed trigger and read the DailyRewardsCurrentDay expression.
Call the Daily Rewards Get Current Day action, then handle the On Daily Rewards Get Current Day Completed condition and read the PlaygamaBridge::DailyRewardsCurrentDay() expression.
Get Current Reward
Returns the id of the reward claimable today, or null when nothing can be claimed (already claimed today, or the streak is finished and cycle is off).
Call the Daily Rewards Get Current Reward action, then handle the On Daily Rewards Get Current Reward Completed trigger. The Is Daily Rewards Current Reward Available condition tells whether anything can be claimed; read the id with the DailyRewardsCurrentReward expression.
Call the Daily Rewards Get Current Reward action, then handle the On Daily Rewards Get Current Reward Completed condition and read the PlaygamaBridge::DailyRewardsCurrentReward() expression (empty string when nothing can be claimed).
Claim Current Reward
Claims today's reward. Resolves to true on success and advances the streak, or false when nothing is claimable.
Call the Daily Rewards Claim Current Reward action, then handle the On Daily Rewards Claim Current Reward Completed trigger — Is Last Action Completed Successfully is true only when the reward was actually claimed.
Call the Daily Rewards Claim Current Reward action, then handle the On Daily Rewards Claim Current Reward Completed condition — Is Last Action Completed Successfully is true only when the reward was actually claimed.
Last updated