Accessed None Trying to read property "Current Weapon" Blueprint FPSCharacter Function: Execute Ubergraph FPS Character Graph: EventGraph Node: Branch

Disclaimer: pseudo-script follows; don’t use as is or else!:

  • we have a base class and 2 children
  • the player can only have 2 guns and they start with 2
  • the first one is the current gun
  • 1 toggles between them
  • this needs attachment, hiding unhiding and whatnot; more logic for picking up / dropping actors

And if the player starts with 2 empty WeaponSlots (as you call it), how do those slots get populated with the correct weapon reference - here we circle back to the error messages: how do you SET Current Weapon. Because it’s clearly not set.


And Get / Set is this:

image

You can see it used with Gun / Weapon vars in the 1st pic.


There are more ways to instantiate those weapons but you’d need to detail the desirable behaviour.

1 Like