Download

Errors I Need Advice On

In my game I get errors after stopping play, I have two guns currently, each their own blueprints. The guns have custom events that get fired off when the triggers on the gamepad are pressed. These custom events are called on through the player characters blueprint. I wasn’t sure how to set this up so I just used a sequence node to chain them together, for example, right trigger pressed=fire(custom event setup in the guns blueprint) for both guns. That’s where my errors are occurring, the error basically reads like this, upon pressing trigger it tried to talk to the unequipped gun(because of the sequence node) and couldn’t because it’s not equipped. This doesn’t seem to affect anything gameplay wise and both guns function perfectly as intended during gameplay, but i’m sure there’s a way to do this so I don’t get any errors, I just don’t know how. Question is if I leave the game like it is will it hurt anything having these errors? If so, can someone explain to me how to better manage this problem? I’d like to have lots of guns in my game.

Thanks to any and all who can help.

If I’m understanding you correctly. You have two weapons but only one is ever equipped at a time, but upon RMB Pressed, you’re telling both weapons to fire? If that’s the case, I would just use a Switch node instead of a Sequence node. Alternatively, you could setup the weapon blueprints to receive player input events and just disable input on whichever weapon isn’t equipped.

Yes that’s it, i’ll have to look into the switch node, I’m still a bit of a noob. If you could explain in more detail about the switch node that would be cool, if not I’ll checkout unreal documentation. Thanks for the help.

There are so many to choose from, and can’t find anything on how to implement it. Not sure How to use the switch node or which switch node to use.