Glad it helps. Keep up the good work.
So that Give Ability logic doesnât seem to be working for me. Not exactly sure what Iâm doing wrong, as it seems like everything should be working fine.
Iâve simplified your logic a bit for testing and proof of concept.
As you can see, Iâve basically done the same thing except just giving 1 ability to everyone at the start of the game. The ability is set in the default value of the variable.
When I execute this code with a print string attached to the Get Ability System component, this is what shows.
So its reading an ability system component, and it seems to be giving the ability there.
My problem is that after this, I canât actually use that ability at all, and trying to activate it in game does nothing. I assumed the problem was that there wasnât an input binding attached to it, and that the âInput IDâ pin on the âGive Abilityâ node would link the input binding to the ability, however it doesnât seem to be doing anything.
I have tried adding an Ability Input Action to Index 6 in the Input Config (InputData_Hero) of my Default Pawn Data (originally HeroData_ShooterGame), in my Experience Definition, hoping that the ability would be assigned to that, but it doesnât seem to be working either (see below).
Iâve tried the same thing in each of my ability sets under my Default Pawn Data too, in case it was adding the ability there, but still nothing.
Also side note, I tried doing this in a new Gameplay Ability rather than the B_Hero_ShooterMannequin, then triggering that ability once I start playing, as I thought it might have more authority to apply to its ability system component, but have the same issue again.
Any ideaâs?
Hi there, I believe you are almost there. I am out of town this whole week, so I wonât be able to test this code from here.
Iâd ask a few initial questions to check if this code is complete. My understanding is that all âextrasâ should be given after âwait for experience is readyâ macro
- Are you triggering give ability from B Hero ShooterMannequinn right after event possess, after âadd initial inventoryâ?
- Does your ability has a âtrigger tagâ associated (see GA_grenade, class defaults, very bottom of the page)
- Are you trying to add abilities before or after âwait for experience readyâ macro inside B_hero shooter?
Let me know if you check these questions out.
-
Iâm triggering after the add initial inventory
-
I didnât have that trigger tag added. I just added it and tested and it still wasnât working.
-
The abilities are being added after the âwait for experience readyâ macro.
I did manage to get a slight workaround by using this logic of yours from one of your videos, by linking the input action trigger to a âgive ability and activate onceâ node.
It triggers the ability in game, but there are replication issues that arise from this. Comparatively, when those same abilities are added to an existing ability set, there are no replication issues and they function as designed.
Will keep testing for a solution this week.
Hi there, thank you for the info.
I believe another possible way to overcome this issue would require a bit more work: add all abilities to the abilities set to proper grant them to all players. Then, after possess event, add gameplay tags for different classes of players ( or selected from menu) and edit all gameplay abilities to add an âapplication requirement tagâ.
Another area of testing should be instead of getting from hero shooter âselfâ + get ability system comp + give ability, you may want to try getting from âplayer stateâ or controller instead, right after possess event/experience is ready. I am not really sure which BP receives the granted abilities, character, player state or player controller, or even any of those because it doesnât matter.
Hope that helps.
Hey mate, I didnât think about using gameplay tags, but thatâs a great idea.
I tried setting that up, but it still doesnât seem to be working. First, just want to confirm if you mean âactivation requirement tagâ, not âapplication requirement tagâ, as that was all I could find in the gameplay abilities tag options. Assuming you did, I tried that, but it didnât seem to work either. It might be a fault in how Iâve set that up, as I wasnât too sure what to put in the âtag containerâ input, so I tried using the âmake gameplay tag container from tagâ and the âmake literal gameplay containerâ nodes as inputs, with the same tag applied, and still nothing.
Iâve also tried every combination I can think of using either the âget ability system componentâ, or âget lyra ability system componentâ nodes with different inputs (get player controller, get lyra player controller, get player state, get player character, etc.), with none of them working. The only difference Iâve noticed is that the original setup you were using (reference to self > get ability system component > give ability) is one of the few setups there that doesnât give an error message after testing saying the âget ability system componentâ is empty.
Any devs able to point us in the right direction? @PresumptivePanda
Seems like this is a fairly basic fundamental to work within Lyra, and Iâm sure thereâs a correct process weâre missing somewhere, so would be great if one of the devs could give us some direction.
Thanks in advance
Hi there, you almost nailed it. The best way to add tags to players in runtime is via creating a child bp of GE_DynamicTag. In there, add the Team. NightVision as âgranted tag, addâ and infinite duration. Then, in hero shooter, get self get ability comp and âapply gameplay effect to selfâ, selecting that new ge created. After that, the gameplay ability will read if that player has the tag, I guess youâre right, it might be activation requirement tag.
Iâll be able to review this logic next week. Hope that helps.
Hi there, have you progress on this topic? I found this old thread from last month. Iâll give it a try and update here.
Hi mate, this is my updated test with Give Ability. Hope that helps.
Here is my latest solution using a blueprint interface.
Apologies for the late reply mate, have been working on another project. Thanks very much for your persistent help and insight, Iâll have a look at these today and see if I can get it working
Hey guys! Just checking if you guys have updated any of this information since posting. Heading down this road soon too. Thanks and Happy Thanksgiving!
Following this guide for a packaged game using a dedicated server setup has the player invisible when the game first loads. Once the warm up phase ends and the match starts the correct character loads and will load on respawn. Why is it that on the first load theyâre invisible (and just a floating gun)?
Was someone able to solve that issue?
Determined that the 0.5 second delay is needed in the B_Hero_ShooterMannequin
just came across this, is what youâre commenting is the solution? @WyattMufson
Yes, adding the 0.5 second delay resolved this