Checks if the player has unlocked a specific car or skin.
Scope
This command can be called anywhere.
Syntax
IfRewardUnlocked( type, reward_name )Game.IfRewardUnlocked( type, reward_name )- type: The type of reward to check.
- 1 / skin: Check for a
skinreward. - 3 / car: Check for a
carreward.
- 1 / skin: Check for a
- reward_name: The name of the reward to check.
Examples
IfRewardUnlocked("car", "elect_v")
{
// Add an extra stage when the player has unlocked the electaurus
AddStage();
// ...
CloseStage();
}Game.IfRewardUnlocked("car", "elect_v")
-- Add an extra stage when the player has unlocked the electaurus
Game.AddStage()
-- ...
Game.CloseStage()
Game.EndIf()Notes
Due to the nature of how console scripts work in the game, all conditional commands are evaluated at the time the script is executed. This unfortunately limits the utility of many of these types of commands, but we believe they still have some use cases even with this limitation.