Spawning Projectiles on Clients in a multiplayer shooter game.
I've been following this thread in regards to problems occurring with server players not being able to see projectiles that are fired by the client players: https://answers.unrealengine.com/questions/43756/networking-problem-server-does-not-see-clients-act.html
I understand that I need to communicate with the server in order to spawn anything on the client, but I'm having a nightmare trying to figure it out. I followed WobblyheadedBobs advice to call custom events that run on the server, but I just cannot get my projectiles to fire at all now.
This is the blueprints for my level, I've created a custom event set to 'Run on server' with 'Reliable' checked. From then I've tried to call a function called 'Fire' that fires the projectiles for each player.
This is the blueprints inside the 'Fire' function, setting the spawn point for a projectile as well as managing the maximum ammo.
And finally these are the errors I am recieving. I have a feeling it is because I need to call a Player Class instead of the player itself, I'm just a little unsure where to go from here.
Any help would be greatly appreciated!
asked Jan 22 '15 at 03:24 PM in Blueprint Scripting
The client is really only considered the owner of his own player controller (and its components), so a "Run on server" event on the level blueprint won't actually make it to the server. Try defining the projectile event in your player controller blueprint instead.
answered Jan 22 '15 at 03:37 PM
Ryan Gerleve STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here