Item pick up count

I have a number of objects in my project that you can pick up and place elsewhere. I’m currently doing this by having a pickup version and a placed version, the placed versions are already in the game and simple toggle to visible if an item is “placed” there.

What I currently want to know how to do is, if I pick up 2 of the pickup actor BP’s, I want to be able to place 2 back down, no more, no less.

At the minute I’m using a bool on the Pickup BP which gets cast from the Placed to check if one has indeed been picked up… I don’t think this method will be possible for multiple accurately will it? What would be my best option?

I was just thinking about Integers… I think bools could work but there would be a hell of a lot of checking and setting them. I think int’s will be the way to go.

I just get confused when I start casting between two things, I still haven’t fully gotten my head around it. Like which thing would set the integers and which thing would cast to what to check what the integer is etc.

  1. Integer summing up picked up actors?
  2. Array of bools - one bool per item instance?

For some reason my initial attempt failed because although it is a class blueprint, each instance of it was setting its own individual number, so going up to one and picking it up set the pick up count to 1. But the next one went to 1 again.

So I’ve made the integer a value on the player character which I cast to in each of my actor blueprints. All working now, thanks for the suggestion miligram9!

http://i.imgur.com/7GHIClj.png

http://i.imgur.com/0kH0Vbx.png