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"

Variable not replicating

I made it so that when the player presses key F it will check if it is overlapping an actor(replication enabled for the actor) that implements an interface , if it does it will call a function of this interface sending the player controller as a parameter

This function calls an event(run on server) that will get the controlled pawn of the given controller, cast it and then call an event(run on server) inside it

This event inside the character will increase an integer +1, this integer haves replication set to repNotify

When notified the player will print his integer with the print string node

This works when the server is the one pressing the F key but it does not for all the other clients

Characters are replicated

The actor is replicated

All events are set to run on server because i want the server to handle this and then just notify the change in the variable

The F key also checks if it haves authority, i tried without authority too

Is there anything i am missing? I can't post a screenshot of the nodes now but i will update this question tomorrow and post pictures if needed

Also what is the best way in this scenario to reference the player on the server? Is it ok to give the controller to the server or can i just send it the character itself(there would be no need to cast this way)

Product Version: UE 4.21
Tags:
more ▼

asked Nov 30 '18 at 04:45 AM in Blueprint Scripting

avatar image

Nico_Pucho_27
73 1 5 12

(comments are locked)
10|2000 characters needed characters left

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