I´m looking for some help/input on the way I´ve implemented weapon functionality in my project. The idea is to have every weapon in the project (3 atm) spawn with the character (no weapon pickups).
- Im having my Weapon_ParentBP (purely functional BP, does not yet include a Skeletel Mesh, etc.) spawn in my FirstPersonCharacter. I pass my input from my FirstPersonController along to my character, which then can pass it along to my Weapon_ParentBP, all through Interfaces.
- In my Weapon_ParentBP I then spawn my Weapon_ChildrenBPs and “disable” all, but one weapon child (the weapon I want my player to spawn with):
The function and macro shown above look like this:
Question #1) Is it the way to go to use the “Spawn Actor from Class” node when handling weapons? Should I just spawn the weapon every time I switch to it, instead of spawning all and disabling the one´s I´m not using?
Question #2) When calling the function SpawnAllWeapons in the Event graph, I get an infinite loop:
The construction script of this BP is completely empty. It works if I only spawn the Translocator BP and leave the others out to spawn. How do I fix this?
Thanks in advance!