UNLOCKING items in godot

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By THE HELIX

Hi I need to know how I can unlock levels or other items in a game by using the coins in the game.Could u please help me out with the scripting and the nodes required.

:bust_in_silhouette: Reply From: RazorSh4rk

This is a really vague question, but basically you want to use a global variable for coins and powerups. This link may help: Singletons (Autoload) — Godot Engine (stable) documentation in English

You can set up a shop scene, where you can spend coins and do something like

get_node('foldername/globals').is_my_epic_skill_unlocked = true
get_node('foldername/globals').coins = ... - 100