Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | EmileBowtie |
So i have a game where you complete Burger orders you’re customers give you , you earn money for that , and you can use that money to buy a new restaurant location to play in . And so i decided that i need to get the money collected my the player saved in the ‘money_collected’ variable , so that you can access that variable at any point in any script . AND also save the dictionary containing the key’s for the restaurant’s you unlocked or can unlock . Specifically , every key’s value in that dictionary can be a number from 1 to 3 . 1 meaning that the restaurant needs to be bought , 2 that its bought but not equipped currently and 3 means its bought and equipped . So if the restaurants’ key’s value is 3 . It means the scene of gameplay will be in that restaurant .
And so , i wrote a script for this all , and in fact it did work properly , but it only saves ‘money_collected’ variable ( or so at least i think ) . Because in the game the value of this variable does react to being changed and saved . But the dictionary doesn’t , so i don’t know if its saved or not . But i think not , since if for example i print - if location_data[“BurgerTown”]==3: print(“true”) . It in fact , does not print true , even known the value of mentioned key is 3 .
And the main problem is in the store , when you buy and equip the restaurant’s , it SHOULD obviously work . There is no other way around it . So I’ve been researching and struggling with this problem for a week now , and i decided that i better get help from people who may actually know the answer . So PLEASE if you do , here are some screenshots of scripts where the problem occurs yet they should be working . I would be extremely thankful for any help !
Screenshots :
Btw here is my Discord btw Shin1949#5799
EmileBowtie | 2023-05-20 04:21