JCInventory, Grid based jigsaw Inventory for your projects

Just want to start by saying that this is a great system and I wish the Unreal marketplace had a rating system so I could give it full marks.

My problem as simply put as possible - I’ve created an issue for myself with the way I’ve implemented spawning Blueprint Actors in the game world. I would be grateful for any advice on how to fix or how to properly implement them using the JCInventory system. Think it’s more me not understanding how the system works than anything and the system already has a way of doing it I simply don’t know about.

The project I’m working on his essentially a tower defense game. The player can craft and find items such as explosive mines using the JC crafting system. If you then ‘Use’ them in the JC Inventory menu you spawn the mine in the game world. If an enemy touches the mine object it explodes causing damage or you can simply pick it up again. All executed in blueprint. It works just as a normal JC item drop would (Like if you drop an ammo box) but I’ve added in the class blueprint a trigger and explosion on enemy contact with the item.

It works great and you can create a minefield in seconds. The problem starts when you have multiple copies of the item as a physical object in the world. If you spawn one mine it works as planned - it either explodes if an enemy touches it or it is moved to you inventory if you want to pick it up again. But if you place multiples of the mine either in the level editor or if the player places multiple mines yourself in game at run-time whenever you try to pick one of the mines it adds 20 instances of itself to your inventory and respawns a physical instance of the mine in the world again. How can I fix this?

I think it’s because I’m (an idiot) using the ‘Event Use Function’ to trigger the spawn which is maybe also fired when you pick up objects in the world? Also because I’ve added Blueprints on the class level but have done so in a way that conflicts with JCInventory functions in my ignorance of the how to use the system.

Possible solution I can think of is letting JCInventory handle the item spawn by simply using the inventory drop feature (Not ideal because in future I was to use custom spawning events to fire a trace to align objects to slopes etc).

Is it simply I don’t understand how to implement new items/classes or is there something specific to the way I’m using the mines? Can anyone suggest what I’ve done wrong or how it should be implemented using JCInventory correctly. Thanks in advance. :slight_smile: