so i’m making a farming game where you grow colorful squares, and i’m having a little problem. you can click on a plot of land, and when you do that, a square grows, such as this
once you click to collect them, though, you can’t replant them. i know why this is, for the plots of land have a variable that tells them if something is being grown on them or not, and that’s not being reset.
the only problem with doing this is that i can’t figure out how to set the variable to false! i assume that it has to go here -
i figure that i need some sort of way to identify which plot is being farmed, but that’s something i don’t know how to go about either, i’m very new to this. if anyone can help, that would be great!
EDIT: this is my full code for both scripts-
this should probably explain it a little better…
EDIT: i ended up making prefabs for all the plots and the plants, to try something out. i feel like that’ll make things easier.