How do you transfer a variable value to another variable? (Solved)

It can be tough. I tried doing something the other day and I still don’t know why it didn’t work.

Often it’s a typo with a variable name, sometimes just capitalization. Other times, I forget to put all the objects into a group.

How about posting the most recent version of your events.

If you’re still stuck, if you put your project on a file sharing site I can take a lot at it.



The first image is an event for toggling buttons
and rest you know it lol
and i tried doing things here and there but no result

I can’t see anything wrong. I’m willing to look at your project if you want/can put onto a filesharing site.
The only thing left is the object layer names or object hitbox. Are you using the most recent version of Gdevelop? they had an issue with the automatic hitbox. I’m not sure if you’re familiar with the debug action to show the hitboxes. You can try adding it. Also make sure everything is in the group.

ScreenRecorderProject5_1

i created a file with the same method as the main file and it is having the same problem
i think it is the toggle button mechanic

What is this? Is this so only 1 toggle can be selected at a time? I didn’t look at it. You would need the same logic as the code that enables the interactions. Actually, you wouldn’t need interactions, so they can be disabled.

image
.
I rearranged things a bit to prevent more than 1 button from being pressed at the same time. There might be a better way but this works. It might need further testing. It’s tough to check for every scenerio.

The issue was the [inverted] on button. If more than 1 button was pressed then it wouldn’t uncheck them. I think this works for both clicking and dragging. And with the interactions being disabled, you wouldn’t need the part that enables and disables the interactions for the toggle buttons.

Finally it is working!!
the toggle button mechanic was the problem
Thank you very much!!

1 Like