Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Spawning Projectiles on Clients in a multiplayer shooter game.

Hey guys,

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.

alt text

This is the blueprints inside the 'Fire' function, setting the spawn point for a projectile as well as managing the maximum ammo.

alt text

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.

alt text

Any help would be greatly appreciated!

Product Version: Not Selected
levelblueprints.jpg (200.5 kB)
fire_function.jpg (253.2 kB)
errors.jpg (134.6 kB)
more ▼

asked Jan 22 '15 at 03:24 PM in Blueprint Scripting

avatar image

6 4 6 6

avatar image DanzigLucifuge Mar 17 '17 at 02:00 AM

Same issue, seen all the threads on this site for it and this one is the most accurate to my problem. Blueprint is not being run on the server at all despite relevancy and replication. The pawn and all movements are replicated from client to server but I can't shoot and projectiles from it. I'm using the fps bp template. I've played with the replication settings on the projectiles, all the scene components and their hierarchies. I messed with the replication settings on the character pawn too. Still cannot get them to shoot replicated on the server. The same pawn is able to shoot on the server and replicate to the client. Not vis versa however.

I also played with some network authority nodes and couldn't make it work that route either. This should be way simple. Shooting a projectile from a client.... I mean what the hell am I doing wrong

avatar image DanzigLucifuge Mar 17 '17 at 02:03 AM

Also I bet someone who is a genius could make a probability matrix that could determine where the problem lies depending on the frequency its asked because something this simple sort of makes me thing maybe the issue is in the project settings somewhere. Does it have something to do with the fire input not replicating?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey JamesPhoenix,

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.

more ▼

answered Jan 22 '15 at 03:37 PM

avatar image

Ryan Gerleve STAFF
1.1k 25 12 49

avatar image Ryan Gerleve STAFF Jan 22 '15 at 03:57 PM

Also, I forgot to mention that events on the client's Pawn/Character will work too, since the pawn is controlled by the player controller.

avatar image JamesPhoenix Jan 22 '15 at 03:59 PM

Thank you for such a fast reply!

I've placed the firing back into the Player Controller as you suggested, and I've had a little more luck with that, (the players can actually fire now) however the server still cannot see any shots the client fires.

I've recorded a short clip which can be viewed here:


I've shown the replication settings for the projectile at the end of the video, am I doing anything wrong in that area?

If not, how would I fix this in the player controller blueprint? (It is virtually the same as in the image in the original post, just in the player character instead)

avatar image Ryan Gerleve STAFF Jan 22 '15 at 04:27 PM

The replication settings look fine, but from the video it looks like the client may still be the one spawning the projectile. I'd suggest setting a breakpoint on your SpawnActor node and make sure it is only happening on the server.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You should have ticked "Replicate" checkbox in Projectile blueprint details. Also replicate fire event from client to server. Try to watch this stream if you have any further issues: https://www.twitch.tv/videos/130237629

more ▼

answered Mar 22 '17 at 05:00 PM

avatar image

240 3 12 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question