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"

StaticMesh Component replication problem


I have a custom event that is set to Run on Server and the Reliable property is set to true. It is launched upon left clicking on the corresponding actor and adds a StaticMeshComponent to it. The property Should Replicate is then set to true for the new component (on event begin play it is also enabled for the starting component). Everything works perfectly fine on the listen server. However, there are some weird occurences on the Client. I will try to describe the problem as briefly as possible.

Basically when the actor enters a certain volume, the player is able to attach new StaticMeshComponents to it. The dynamic material instances (initiated on the event begin play) adjust themselves so as to tell the player where are the valid places for the addition of a new static mesh (valid are painted in green, invalid in red). When a player clicks a valid place a new StaticMeshComponent is added using the above-mentioned custom event. If the character leaves the volume, all of the dynamic material instances go back to normal. All of this is what a player can see on the listen server. On the client happens something different. None of the dynamic material instances are altered when the actor enters a volume (and this is actually what I need, because the first player should not see the valid places of StaticMesh addition for the second player). When the StaticMeshComponent is added and set to Should Replicate on the server, the client sees three StaticMeshes rendered instead of two. Surprisingly, one of the static meshes rendered suddenly has the dynamic material instances adjusted to green and red, not to mention the fact, that there are actually two static meshes in the client's array of Static Mesh Components references for that actor. Still the script runs only on the server and the array is not set to be replicated, so it should remain with only one element throughout the entire gameplay. I don't understand that really... Here are some screenshots depicting the problem: -Server (Player 1)-

Before entering the volume

In the volume before addition

In the volume after addition

-Client (Player 2)-

Before entering the volume

In the volume before addition

In the volume after addition The green glimmer in the middle of the actor is the third rendered static mesh which somehow has the dynamic material instances altered.

Thank you in advance for any feedback or help :)

Product Version: Not Selected
more ▼

asked Feb 04 '15 at 11:29 AM in Blueprint Scripting

avatar image

51 16 21 25

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

0 answers: sort voted first
Be the first one to answer this question
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