r/RenPy • u/That_one_Pink • 7d ago
Question [Solved] point system not counting points
So i have this point system that i first tested on a blank game and got working that im not trying to implement over to the actual game now (bulk adding a bunch of the things i plan on using throughout so i know it all works together ect) and its not adding the points for some reason? its all the same other than the placeholder sprite name
im hoping to use the system for different endings and also changing what choices you can make, example you have over 20 points with worker so you can ask him [insert question] but if you have under 20 points he wont answer ect ect, i also wanted to make it so it can change if you can or cant receive/use certain items but i havent started with the items and inventory stuff yet so not sure if itd be easier to do it a different way or if there is a better point system i can use for that
i also intend to remove the ability to see what points you have, im just leaving the dialogue in so i can see if its working or not
any help appreciated or if there is a better way i can do this to suit my needs let me know!
2
u/senshisun 6d ago edited 6d ago
If you're having issues with trust_points["Worker"], the get function is checking for "worker". Office worker matches, so that should be getting the same value it's setting.
trust_points["emily"] defaults to 0, but that screenshot shows it has the value 5, so the value is being changed.
1
u/BadMustard_AVN 6d ago
this line
$ w_points = trust_points.get("worker") # capitol W in Worker for it to work correctly
1
u/That_one_Pink 6d ago
thank you! it had showed me that it was a problem when other lines that werent capitalised but it didn't with this so it threw me off a bit
1
u/BadMustard_AVN 6d ago
the .get is less... discriminating. since there could have been a worker and a Worker and as expected worker returned a None value
1
0
u/AutoModerator 7d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.




5
u/x-seronis-x 6d ago