What I’m trying to do is a weapon system where there’s just one weapon blueprint and a structure with all the weapon data. When I change weapon with an input I want to select the correct row in the data table, so I can get the weapon data. If you look at the screenshot, I just need something to plug into the Row Name to change it.
So the other weapon you have on you - it sure has the name you need, right? Pull it out of the weapon and query the DT.
Would that work?
If in doubt, do explain how the weapons are stored on the player. But most importantly: why do we even need to do this? Wouldn’t it be more logical if every weapon had its own data rather then pull it out of a DT every time you need to use one?
Or is this some kind of advanced mechanics where the weapons are highly customisation and / or modifiable.
Generally speaking, you query the DT for the name and make an Actor out of that data. Not the other way round…
Alright maybe I haven’t explained myself all too well, sorry, I’m very new to this. I saw people recommend to create a weapon system based on DT from this thread:
This is what I’m trying to do, but being that the answer didn’t go in depth as to how to actually implement it, I’ve gone through that on my own, but I’m not even sure if I’m doing the right things. If you think this is an actually decent system to use, then I’ll go ahead and explain what I’ve done so far, so that you can figure out what’s left to do. Otherwise, I’ll just switch to a more optimal system.
Yes. There’s a master blueprint for how weapons work, a parent class and child blueprints. That way, when you switch weapon, you’re only changing the weapon’s mesh and changing the weapon stats that are contained inside the struct I created. Really cumbersome for 2 weapons, but good for large amounts.