Newbie, want to make a point system in my dress up game in godot for endings
Hello, just so you know, I'm a newbie in programming in general, so I ask you to be easy on me even if the question is resolved just by going through the docs (already did that, still have hard time understanding it).
I'm working on a dress-up game that has a character that won't want to wear certain clothes and if there are clothes on him that he doesn't like, the game will lead to a bad-ending scene and vice-versa.
I can search how to make events lead to changing a scene by myself. The actual questions are:
How do I group the clothes properly (I think I should look up global groups on docs here)?
How do I make points reset when clothes are dragged away from their perfect position (i.e. on character sprite)?
How do I make clothes correspond with eachother for the point system (explained further)?
Current issues
I'm away from my laptop, so can't provide exact code for now, so I'll do my best to explain
The code I'm using is from this tutorial
Pastebin with the drag and drop function itself as well
What I tried to do is a boolean @export for bad and good clothes, then go through if-elif statements for them in a drag and drop code, which sorta works, but:
Points get attributed only to one clothing (for example: I drag a yellow shirt as a good clothing type and get +1 to the point variable (therefore it is =1), but when I drag pants from the same type, it doesn't consider previous +1 and stays =1)
Points don't reset after clothes being reattached (if I drag away said yellow shirt and drag it back to the perfect position, it still will add a +1 and the point variable will equal 2 and so on)
@godot
#godot #duckduckfedi #askfedi