Character Selection - Lyra Starter Game

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.
image
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

  1. Are you triggering give ability from B Hero ShooterMannequinn right after event possess, after ‘add initial inventory’?
  2. Does your ability has a ‘trigger tag’ associated (see GA_grenade, class defaults, very bottom of the page)
  3. 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.

  1. I’m triggering after the add initial inventory

  2. I didn’t have that trigger tag added. I just added it and tested and it still wasn’t working.

  3. 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.

1 Like

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

1 Like

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.

1 Like

Hi mate, this is my updated test with Give Ability. Hope that helps.

Here is my latest solution using a blueprint interface.

2 Likes

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 :slight_smile:

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