How to add gunskins to Lyra Starter game

Hey there @Deadshot1m24! Changing out the materials on the Lyra guns based on the player is easy as pie for singleplayer, not quite so simple for multiplayer however. Generally the idea would be to store the player’s skin information in a struct somewhere, for singleplayer I’d pop it in the game instance as it persists through levels. Then you’d be able to call from the Begin play in the weapons (which are called every time a player pulls them out) to change the weapon material to the one stored in the game instance.

But this is complicated by multiplayer in that you would want to get the reference from whatever authority tells the player what skins are unlocked and all that jazz.

Whichever mechanism you use to get the materials over, you’re going to likely apply it in the BP_Gun’s start play, but you’ll have to get that variable from either the player actor, their player state, or passing it in from the session or somewhere else.

Bonus hint: All of the materials need usage flags for SKMs
image

In short, the answer for this is kind of full tutorial worthy!

2 Likes