Skip to main content

Lucky Wheel

A Lucky Wheel in a game is a type of mini-game or feature where players have the chance to spin a wheel and win various rewards. The rewards can range from in-game currency or items to special bonuses or rare items.

The Lucky Wheel typically has multiple segments, each with a different reward. Players can spin the wheel by pressing a button or tapping on the screen, and the wheel will rotate until it comes to a stop on one of the segments.

The chance of winning a specific reward is usually random, but some games may offer better odds for certain rewards or give players the option to spend in-game currency or real money to increase their chances of winning.

The Lucky Wheel can be a fun and exciting feature in a game, as it gives players a chance to win valuable rewards that they may not be able to obtain through regular gameplay. It can also provide a sense of anticipation and thrill, as players wait to see what reward they will receive from the wheel.

Overall, the Lucky Wheel is a popular feature in many games and can add an extra layer of excitement and reward to the gaming experience.

Lucky wheel.

Setup Lucky wheel

Blueprint

  • Open Liveops tools and select blueprint data on the sidebar (https://liveops.oneb.tech/blueprints)
  • Locate and select the blueprint named Lucky wheel.
  • You can change any value or change this template if you want. please refer to the following instructions

Game scripts

  • Open Liveops tools and select Game Scripts on the sidebar (https://liveops.oneb.tech/gamescripts)
  • Select script name Lucky wheel
  • The script provides the following functions:
    • getList: This function retrieves a list of lucky rewards for the current player.
    • claimItem: this function is used when spinning a wheel. The claimed rewards will be added to the inventory.
    • canClaimItem: this function is used to check the current player has reached the daily limit
    • again, You can change any code here to match your product

Code client

// Get list
var luckyWheel = await OnlineManager.Instance.API.Send<LuckyWheel>(new CallGameScriptCommand("LuckyWheel", "GetList"));
// check can spin or not
var canClaim = await OnlineManager.Instance.API.Send<LuckyWheelCanClaimOutput>(new CallGameScriptCommand("LuckyWheel", "CanClaimItem"));

// spin
var claimItem = await OnlineManager.Instance.API.Send<LuckyWheelClaimItemOutput>(new CallGameScriptCommand("LuckyWheel", "ClaimItem"));

Example code: luckywheel.cs