This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hey everyone! I need help with how to implement some point and click mechanics in a small game I'm making.

My main character is in a room, and he can turn on and off the lights in said room, that changes which objects he can interact with, and of course, if he, for example, moves a piece of furniture with the lights on, this piece of furniture will remain in that position with the lights off.

Any tips or ideas on how to approach this mechanic? I'm guessing I should have two screens active at the same time so i can obtain information on one and switch to the other, but I'm not sure how to implement it.

in Engine by (12 points)

1 Answer

+1 vote

Since the room will be the same, no need to have two of anything. What you have are two states, so a simple var is_light_on = true or false will do the trick. you can have it in any script that makes sense, and then you check the var to see what interactions are possible.

by (450 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.