Weapon Selection Menu

Hi everyone. How can I create a weapon selection menu which is situated in the menu level but affects the playable one? I already have a weapon base system with 2 children weapons, but I don’t know how to access them trough the widget graph and save the selection (sorry for my english).

Check out video #20 in the link below. It goes over how to store global variables in a game instance. You can store your “selected weapon” in the game instance and when you travel to the first level use the game instance to set the player’s weapon they selected from the main menu.

Ok, for the primary weapon everything’s fine, but only if I don’t link the secondary.

If I link the secondary too I spawn with no weapon.
Here’s the whole graph if it’s userful: Imgur: The magic of the Internet

You can’t use the same variable to store the primary AND secondary together. You would need an integer variable for the primary weapon selected and one for the secondary. Save both to the game instance and have 2 separate functions one that loads the primary weapon using the primary weapon equipped integer and one that uses the secondary weapon equipped integer to load the secondary weapon. With this combined setup only the primary weapon will be correct or only the secondary will be based on whether or not you set the weapon equipped integer with the primary weapon first or secondary. A “switch on int” will only fire one execution path based on the integer input. So if the integer value is 0 it will fire execution path 0, if it is 1 it will fire path 1 etc. So you can’t equip BOTH a primary and secondary weapon like that.

I finally fixed everything. Thanks a lot for your help man

No problem!