Help with populating a players inventory upon spawn

I have the following the Event Graph of the ShooterGameMode blue print in /PrimalEarth/CoreBlueprints.

I’m basically just trying to spawn my character with a flare gun in it’s inventory for testing purposes. But this isn’t working.

What am I doing wrong?


Thanks!

You need to do the bind in another event (like Event Begin Play). The way you have it now, the event is wired to bind itself (o_O), but nothing is triggering the event in the first place so it never actually gets bound or run.

Event Begin Play -> Add New Item. You will have to turn off “Context Sensitive” to see the “Add New Item” function.

Thanks for your replies. I have turned off context sensitive but I don’t see a Begin Play event. I see an end play event though, heh.

In case anyone finds this thread in the future, here is what I found.

That thread was very very helpful!

Ok, I got it to work. I’m not sure if this is the most elegant way to do it, but it works!

Thanks to everyone for their help up to this point.

Edit: OK this works greats on a players first spawn into the game, but it doesn’t load anything into their inventory when they die and respawn. I’m assuming that’s because ‘Begin Play’ only gets called when the player first loads into the map. Thoughts on catching a respawn event?

Ok since you’re using the graph in the Game Mode, I would do this:

2144a04e81c9e4067887d08ab438033247ff8b4e.jpeg

To see some of those functions you have to check “Context Sensitive” for others you have to uncheck it.

EDIT:
Or the way you did it is fine :P.

Thanks for that detailed response! Check my edit on my above post. This all works great but not when a player respawns.

I like your method though because it seems like it would work well if there were “rounds” in my game and I loaded up every player at once before the round began.

For example when I do this… just to see if I can even show a message everytime I spawn…


I only see the “Spawned” message once and that’s after the first time I spawn, not on respawn.

You would need to figure out what event or variable/whatever gets set or activated when the player respawns. That is when/where you would add the item into the player’s inventory.
IDK how to check if a player respawned yet, I haven’t got there yet with my mod. :stuck_out_tongue:

I was worried I might have to hack something in. Time to brain storm heh