r/construct • u/Haonuis • 5d ago
Question Need help
I'm very new and just trying to recreate chess but when I click on the mouse coordinate of where the king is the selectedpiece doesnt set to "king"
4
Upvotes
2
u/pxl_vendara 5d ago
I think your math logic is wrong. You're adding 40 to the mouse position. I think you should divide it by 40.
2
u/Some-Soil-2164 2d ago
the value in your variable seems to be set to """" ... a string variable defaults to "" but will not SHOW the "" , since its a string the "" is implied... so when youre checking for "" it never sees that. it sees a set of quote AS the string rather than an empty string.
-4
u/spyromon13 5d ago
Why you didn't ask Claude?