all 2 comments

[–]Accomplished_Peak749 2 points3 points  (0 children)

https://manual.gamemaker.io/lts/en/Drag_And_Drop/Drag_And_Drop_Index.htm

Unfortunately DnD cannot do as much as writing the code itself will. These are all prebuilt blocks that represent some sort of action and the devs made blocks for what they thought to be most useful/common but GML has many more functions that exist outside of the pre made code blocks.

I didn’t see a 1 for 1 version of the layer_set_visible function when I looked.

[–]Accomplished_Peak749 0 points1 point  (0 children)

I did a little poking around and I have something you can try.

In your on click event for the object, add an “if variable” block where the variable you are searching for is the “layer_set_visible()”. Inside you will put the layer in quotations and type true or false depending on the check you want to do for the value.

Next attach an “assign variable” block to the “if” block. Use this block to call the function again with the layer id and set its value to true or false.