hey all, i’m looking for some insight on attaching weapons (or any usable item) to a player client.
i have tried this many (6) different ways so far, and every time some aspect fo the weapons do not function reliably, either they do not fire correctly, do not attach to the client skeletal mesh, or even appear to work in PIE but fail utterly in stand alone builds.
my latest attempt is very simplified, i have a replicated player pawn, weapon blueprints that inherit from a parent, then within the player i have a child actor component, in which i destroy the actor component and spawn a new one each time the weapon is switched. this method i chose as i suspect the errors i had perviously were a result of the weapon not having a specified ‘owner’?
at any rate, i am multicasting the switch weapon function which destroys and replaces the actor component of my child actor component on the pawn, and then use a blueprint interface to call the firing function, which appears to work correctly in some cases, but i also have a custom event on the weapon class that i can call from the player after using a cast (i suspect there are some issues with casting in Stand alone, which is why i am leaning away from them for now) so if i use the interface, the weapon fires correctly, and the projectile replicates, however the weapon is not attached to the skeletal mesh on the client ONLY, and i also do not appear to be able to access the controllers forward vector to launch in the correct direction.
if i use the custom event, i achieve much the same result, however the projectiles do not then replicate to the server, only visible on the client.
clearly this is a networking methodology issue, as well as potentially a core problem with the way i am approaching the problem.
I would be tremendously appreciative of anyone who cares to assist, i will be posting screens of my blueprints shortly, and i sincerely hope if i can get a helpful answer, i will respond expanding on where i went wrong and hopefully help others who share my misdirected understanding of networking in general.
p.s i have watched the blueprint networking tuts a number of times, and i DO realise there is something i am missing in them, no question.