Advertisement
Bluefox_dev

Looping through a dictionary in gdscript

Dec 11th, 2021
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var dictionary = {"test1":false, "test2":true, "test3":false}
  2.  
  3. for i in dictionary:
  4.     if dictionary[i] == true:
  5.         match i:
  6.              "test1":
  7.                  print("1")
  8.              "test2":
  9.                  print("2")
  10.              "test3":
  11.                  print("3")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement