Hello,
I’m creating a farming game and setting up a function to instantiate Plants right now.
The problem this function should only be called on a tilled field tile.
Is there a way to put any behaviour, in this case just a simple bool, on a specific tile?
Short answer: Yes, of course!
Longer answer: You can set up your game to run any way you like. The only limitation worth considering is your own skill, design decisions, and preferences.
To give you anything more specific, we’d have to know a lot more about how your game works. Are tiles entities that exist at this time? Do they have something that keeps track of their type and state? If so, it should be pretty straight-forward to add the functionality you’re looking for.
If you don’t have tiles working in that manner yet, you’ve gotta sort that out before you can do the plant spawning thing.
Sorry for the late reply,
to answer your Question I am using the build in isometric tilemap that handles the tilemap all together.
To give more context of what kind of game I’m working on.
It is a isometric farming game like animal crossing or stardew valley.
I will just create a manager object that stores an array of all tiles and work with that.
I think that is what you meant.
Thanks for the help either way.