Bleuprint copy problem

I’m with you…

Ok, so a number of ‘trees’ in the level. Each is a BP. Walk up to one and click it ( maybe ) and a widget appears saying ‘harvest fruit?’

Give each BP an ID. It’s just an integer which you can assign in the editor. When you walk up to a tree and click, it calls the BP, but leave a copy of it’s ID in the game instance. The widget can look in the game instance and know which BP has been clicked.

The game instance is one of these things you’ll hear about all the time, along with player controller, game mode, game state blah blah blah…

Basically the game instance is a BP setup by the system when your game starts running, it’s always there in the background and accessible from everywhere:

So do this:

  1. Make a game instance and put a variable in it, just an int called ID. ( compile, save )

  2. In your BP ( the tree ), you can say:

](filedata/fetch?id=1806928&d=1598908067)

  1. In the widget:

](filedata/fetch?id=1806929&d=1598908244)

It might look like a bit much, but it’s not really. Watch the vid, see how it goes…