Skills are assigned in a blueprint component called “BPC_Attacks”
The rest of the values on S_Skills are there because im working on a skilltree and id like them to follow the same structure (if its not possible then fine)
Id like for the system to be flexible so im able to add abilities in the future too
At the moment not needed but im going to make a menu that allow the player to assign the abilities to slots
Fetch it by index and fire an Interface message. Alternatively, if you do not want to clutter things with yet another interface, rely on Event Dispatchers inside user widget wrapped named slot.
If you want the lot remappable, you’ll need Enhanced Input, potentially right inside the widget.
If you use an enum value or class value is up to you, but in a system where values are going to change (the amount of skills will grow / shrink / be flexible in other ways) then enum is not the most supportive data type. You could consider replacing the enums for skills with soft pointers to skill classes.
What I had happen with enums is that I used a bunch of enum values in my animation blueprint, then changed the enum, at which point all enum properties / comparisons in blueprint assets started to show “invalid value / byte”. It’s best if you can avoid that and use enums for small switch cases that are expected not to change.
for better advice, please post your engine version and input system of choice when asking
Im not sure i quite understand what your saying since i dont really use map variable types often. But from what i understand, your assigning an integer as an index for every skill. Im not sure that this would work with what im doing because of the variables (like damage) which are increased with the player level.
I also want to trigger the 4 slots with numbers 1,2,3,4 on the keyboard
If it helps the attack component contains all player and ai attacks that are different from the normal sword attack, in there attacks follow this structure
although in this case “Max distance” and “size” are specific.
I have not used any ability plugin myself. The advice in general is use c++ as soon as you can, use BP only for prototyping. In some cases you or your designer benefits from the asset editors of BP assets (design widgets, preview animation blending etc.), then you write all logic in c++, make a new class inheriting from your c++ class purely to design the visual details. Your widget would be a c++ UserWidget class implementing all logic. It holds some UPROPERTY with the “bindwidget” flag to which the designer implements the visual design in a blueprint asset. This separates core logic from design. Writing everything in BP makes it a pain to port to c++ later, it’s like starting over. You do need to get comfortable with C++, because technically it is a bit more difficult and you get much more freedom.