x

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"

Replication issue or Controller issue? PLEASE!

I'll try to narrow this down so this makes sense, I'm working with a listen server (open map?listen) off of two computers.

Server Project File:

  • I set up PlayerBP to play a JUMPING animation sequence on keypress C - replicated with Run On Server.

  • Replication looks good on a quick two window Server/Client test.

Client Project File:

  • Copy/pasted project file, same PlayerBP

  • But on the client project file, I SWAP the JUMPING animation for a RUNNING animation.

So when I connect both PCs to the map and press C, on the Server PC the client's pawn is playing the server JUMPING ANIMATION (instead of running).

And when I press C on the client's PC, the server's pawn is playing the client RUNNING ANIMATION (instead of jumping). This is basically causing a "mirror effect" with both pawns.

There's some weird issue where upon animation activation, it just plays the animation stored in the projects BP.

Am I not supposed to switch blueprints around in a multiplayer project? All I'm doing is replacing the jumping animation with the running animation.

I think this is either a controller issue, or a replication issue, which one would you say it is?

Product Version: UE 4.20
Tags:
more ▼

asked Oct 11 '18 at 09:47 PM in Using UE4

avatar image

Pizza Planet Sid
11 1 2 5

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

2 answers: sort voted first

Hello, can you provide screenshots of the BP setup? It's a bit difficult to understand what you're trying to do without seeing the code itself.

more ▼

answered Oct 11 '18 at 10:30 PM

avatar image

Kvackie
6 1 4

avatar image Pizza Planet Sid Oct 11 '18 at 10:53 PM

Hi Kvackie, thanks for the response. I uploaded a YouTube video showing my project and its blueprints:

https://www.youtube.com/watch?v=CfBwAKRWDDY

At the end of the video, when I show myself deleting the animations and "replacing" them with new ones, this is what I am doing on the client's PC. I am replacing the jumping animation with a running animation, but leaving the jumping animation on the Server PC.

So when the client presses C, the Server sees the jumping animation on the client pawn.

Do you know what might be wrong with my process?

Thank you!

avatar image Kvackie Oct 11 '18 at 11:06 PM

If I've understood this correctly, you're trying to play two different animations on the server and client? Since you're using the same Pawn for both it will always play the same animation, there is nothing wrong with your code.

avatar image Pizza Planet Sid Oct 11 '18 at 11:11 PM

That's correct, I would like to have two different animations stored on the client and server's BP. If there is no issue with this, do I just need to create another pawnBP for a second player?

avatar image Kvackie Oct 11 '18 at 11:15 PM

There are a few steps to it, but in short, yes. You'll need to assign a pawn for Player 1(server) and one for Player 2(client). In there you must store the animation.

avatar image Pizza Planet Sid Oct 12 '18 at 12:36 AM

Thanks for the help Kvackie. I was wondering, do you know if the animation MUST be stored on the clients project? What happens if I my server has a different animation playing than what is stored in the clients blueprints, will it not be able to replicate something that is not stored?

avatar image Kvackie Oct 12 '18 at 01:30 AM

The server can only use what information is available to it, if the client doesn't have any animations then no animations are available. Your server can't play a different animation than what is stored because it has to check what is stored to play it.

avatar image Pizza Planet Sid Oct 12 '18 at 01:34 AM

Thank you for the help Kvackie, I appreciate it very much!

avatar image GrumpyNZ Oct 12 '18 at 06:47 AM

Why are you connecting to a server that has different code than the client? Is there some super advanced technical reason you're using a different project file for your "client" machine? This is a very strange approach.

If you could explain what you're trying to achieve doing this i'm sure it'd be easier to help.

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

Why not just use the isServer node and a branch when deciding which animation to play, and let them both have the same code for the pawn BP?

more ▼

answered Oct 12 '18 at 04:22 PM

avatar image

mightyenigma
3.8k 18 23 20

(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