Why does this gate not work?

So here’s the Berry Bush situation.

It would be nice if the bush could communicate with whoever is picking the berries. So the player also has an Interface now through which they can receive messages from other entities in the world.

  • we’ve got 3 functions, adding & removing stuff (not addressed here) and Sort Harvest

(this 2nd interface is not technically necessary but it does demonstrate a more in-depth 2-way communication setup)


The Berry Bush child implements a brand new Harvest function:

  • it requires a Harvesting Actor input so the bush knows who is plucking it
  • this allows it to call Sort Harvest (green frame) through the player’s Interface mentioned at the very top
  • here the berries are static meshes with a tag to identify them easily
  • when this actor receives a Harvest request, it checks whether it’s ready, counts the berries and sends call to the Harvesting Actor’s interface, we send the Amount of berries and their Type (perhaps bushes can grow all kind of stuff)
  • Then 1, we hide the berries (to regrow and show them later perhaps) and flag the bush as not Ready For Harvest anymore
  • the bush will also update its text
  • the Begin Play bit at the bottom is a debug thing, we start the game with half the bushes Ready For Harvest (you probably have your own method to re-grow berries)