Been trying for the last ninety minutes to get this to work, but whatever I try, it just won't.
I am trying to check if a dirt block is over the water level & if it doesn't have another block on itself, and then if it doesn't have one, set the block to animation frame 1 (to a grass block).
This is what happens when the code runs. No block becomes grassy (that one in the image was set by me).
You can not check whether the block is overlapping itself. What do you use to for your water? wouldnt it be easier to check if the block is overlapping the water?
The water is pretty much irrelevant. If blocks are over the water and stacked, then only the top most block which doesn't have a block on it should become grassy, the ones stacked below him should remain dirt blocks, as grass can't really grow under earth. If I just check if the block is not overlapping the water, then even the ones stacked under the most top dirt block will become grassy. My water atm is just a sprite, as a placeholder, planning to replace it soon with water blocks. :| This is taking longer than my complete inventory system did... Having grass grow underground would be silly, so I need to be able to compare this
Develop games in your browser. Powerful, performant & highly capable.
Then you need to put the block into a famaly and check if the block is overlapping this famaly at offset
-> If Block is not overlapping fam_Block at offset (0,-1) -> Set animation
Good idea, but does the same as the: Block not overlapping Block(0, -1) :/
Well, it feels like an engine limitation to me kriand
I did a workaround
Thank you for all the help!