Action bar slots problem when assigning the skill on a specific slot..

How or what will be a more better/efficient way to create skills ?

Ok so in my player the skills arent even in a function just on the event graph. I guess from your example above i should move them all in a separate functions ? And then call the functions later in the action bar slot / as well in the check bindings function? (check bindings function was in the player controller)

Are there any major downsides when im creating the skills in the player bp as it is right now ?

Edit: i see the functions all get called on the action bar slot and this slot should have 1 custom event that executes all the skill functions and thats going to “check bindings” on the player bp… Again is this having some bad downsides doing it like this? I think i can still change move the skills or manage them differently as long as i dont need to remake the whole skill system and tree again… i mean the skills are all separate and i can rework them if i can make them work any better at the end.

Ok so in my player the skills arent even in a function just on the event graph.

That’s not great, but it would still work, events are called the same way.

Are there any major downsides when im creating the skills in the player bp as it is right now ?

Yes, too numerous to mention. It will become very difficult to maintain.

i see the functions all get called on the action bar slot and this slot should have 1 custom event that executes

That’s why there is switch that will trigger only 1, based on its name.

How or what will be a more better/efficient way to create skills ?

Apart from GAS which I worked too little with, my absolute fav and flexible system revolves around Actor Components:

image

A single base and many children, each child implements the desired behaviour and overrides a virtual event:

Store the actor component class in the struct; to give the player a new ability:

The best part comes from the EI since you can now map context Input Actions directly into the Actor Component if you so wish. No need to reroute input through a widget and so on.

This is not a tutorial, ofc. I’ve yet to take it for a spin in UE5 + EI - I’ve been using it for a couple of weeks only. There may be a snag I’m unaware of, ofc. But the whole point of EI was to simplify, organise and prioritise mapping.

Acctually there is a skill component but there was the basic logic how a skill get unlocked.
Maybe i should move the individual skills in there as well ?

Yup, each skill is an Actor Component. It has the logic, variables, knows how to upgrade itself, etc. Can be dynamically added to and removed from the player. It also works great for temporary buff / debuffs, imagine spawning something like this on the player (or enemy) and never needing to worry about anything else:

The best part is that you deburden your player class which is generally one of the busier there is.

I’m still trying to make just an example skill work like the example above. And if it can be triggered by pressing 1 key when dragging it to action bar slot 1 or if it again triggers when i press any key on the actionbar. It is not working tough not sure why

the skill on a function

on the action bar slot itself

and on the player controller where the “check bindings” was

and on the player bp

You never even connected it:

And you were supposed to call the slot so it can send its struct data:

Double check what posted.

Ok i just connected it but i have the same result as it was befor. I drag the skill on slot 1 but any key from the action bar triggers it :confused:

You’re using default: so anything will do:

image

Don’t use default. This is your ghetto ability filter.

Do you mean i need to add another pin and use the next one ?

Like this i can purchase the skill but now no keys at all trigger it anymore…

Like this i can purchase the skill but now no keys at all trigger it anymore…

Because you do not have an ability called Case_0.

You need to add the skill names:

The names of the abilities, as seen in the struct, go up here :point_up_2: .

You need to punch in every single one manually.

That’s way this is a horrible system. But I do not know how to make it work without reworking the entire thing…


Imagine, if you also stored Actor Component class, the widget would call the player and:

And the ability actor component would execute the script inside. You could even add them upfront (to dramatically simplify things):

image

Not ideal but a step in the right direction.

1 Like

If thats the major downside than i have no problem putting them 1 by 1 there as long as it works…

Not sure why but it is still not working all keys are triggering the skill once i drag it on the actionbar…

I try like this maybe ?

then stuff like

It either dont trigger the skill or if it trigger the skill then on all keys


It is not working as it seems i tryed all the different combinations. Looks like the one from your example works but as it was befor i can purchase the skill and it unlocks it but when dragged down to the action bar any key triggers it.

I have data table name and the roll name i tested with switching only to “Name” but that fails as well and the skill dont get recognized anymore so i need to use the data row name. Anyway im back as where i started unfortunatly. The action bar slot keys get recognized per print string correctly like pressing F key and it print strings F or 1, 2, 3… (and not pressing a key and print string all keys at ones or something like that) So not sure where the failure is that when i drag the skill it apply to all the keys and not only to the slot i dragged it to… Maybe there is a simple solution to this or we miss something somewhere…

I want to try this with the all skills on an actor component.
Do i need to store the actor component as a class ref in the data struct and should it be an array ?

A single is enough. Each ability knows what component it is.

1 Like

I finally manage to make this working from your description back then :slightly_smiling_face:

I just revisited this after a long time off and now finally it is done. All the skills now work when pressing a key with your method. I can even move them around or even change the key bindings and they still work with this method. Thx again this helped a lot.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.