I looked around for solutions but none were clear for me and I’m very new to programming.
How would I write if statements when the attribute(s) being compared are declared and manipulated in different scripts.
In my project I’m programming a betting board. Players will choose one of 3 chips by clicking said chips icon on the screen. For this I’ll use the red chip as the example. Clicking the chip will turn a Boolean attribute named “redclicked” equal to true, to show it’s been selected. Then a red-chip should appear on the board tile selected by the player. When a tile on the board is clicked a function runs to check which chip has been selected, in this case, if redclicked = true then the chips icon should appear on the board. This of course doesn’t work because the if statement can’t check if redclicked is equal to true or not because it’s in another script.
What type of solutions are available to fix this?