this post was submitted on 08 Jun 2026
11 points (92.3% liked)

Godot

7673 readers
71 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 3 years ago
MODERATORS
 

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:

  1. How do I group the clothes properly (I think I should look up global groups on docs here)?

  2. How do I make points reset when clothes are dragged away from their perfect position (i.e. on character sprite)?

  3. 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:

  1. 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)

  2. 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

you are viewing a single comment's thread
view the rest of the comments
[–] Mensh123@social.tchncs.de 2 points 1 week ago

@vv0ltz @godot I haven't taken the time to disect your code (use comments where neccessary and try to make one function do one thing, your future self will thank you) and I don't know the rest of your project. I've still come up with a solution for scores that dampens the impact of forgetting to decrement it.