r/construct • u/Haonuis • 9d 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/Some-Soil-2164 6d 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
2
u/pxl_vendara 9d ago
I think your math logic is wrong. You're adding 40 to the mouse position. I think you should divide it by 40.