Persistence with random stats on weapons in inventory

dazuk1978
Thu, 08 Jun 2017 10:45:02 +0000
Editor Scripting

Hi,

I am using this inventory system by UnrealGaimeDev Complex, slot-based inventory system - Community Content, Tools and Tutorials - Unreal Engine Forums.

I’ve changed a few little things but on the whole it’s a great system that’s really brought a lot to my little rpg game.

I have reached out to the developer to help me with a few things but he must be busy as I’ve had no response as yet and I really need to crack this issue so I can start creating tons of weapon and item variations.
I know it’s a long shot asking on here but there’s a chance the answer I need is more of a general thing rather than system specific, so here goes:

I roll random attributes on a weapon at runtime when it spawns into the world (As loot etc) but once picked up and equipped, these stats keep getting rerolled on that same item. This is due to the way the inventory system works in that it constantly destroys and respawns that item, therefore triggering the Construction Script and indeed the other Event Graphs relevant to it spawning.
I see two solutions, but don’t know how to tackle either.

1> Make it so that instead of destroying the items, it merely transfers them to the character physically (and perhaps hides them when they are unequipped and in the inventory?) so that the item never gets destroyed, even when dropped into the world or equipped/unequipped constantly.

2> When first picked up and placed in the inventory, we save the stats somehow and keep recalling that saved snapshot whenever we equip/unequip the item. This seems the most logical option to me, but I cannot think how to do so. There are many blueprints and widgets involved with this system and a lot of inter-dependencies so although I have some ideas, I doubt I could reliably make this change without a solid understanding of the whole picture.

Has anyone used this or a similar system and come across the issue that I have? Did you fix it? Can you share your ideas/solutions or suggestions with me please?

In the mean time, I am gonna watch all the videos of his making the system to see if I can find mention of this issue.

Thanks for your time,
Daz

4 posts - 1 participant