Announcement

Collapse
No announcement yet.

Client can't damage other clients/server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Client can't damage other clients/server

    Hey, so I've been trying to fix this problem for a couple days and no luck, so here's what's happening: I'm making an online game with melee damage, but when testing, clients can't hurt other clients or the server, but the server can hurt and kill all clients and NPCs aswell, and when the server kills any NPCs, the clients can see them dissapear and all.

    I believe the problem is: The client isn't receiving and damage, so the "Apply Damage" node isn't working, because it prints a string before applying damage, and after, but it doesn't print a string that should happen right after receiving damage. When playing with server, it works just fine, but when playing with Client, it doesn't seem like the target is receiving any damage.

    The screen-shots are in portuguese, but I don't think the event and variable names matter, if necessary I'll change them and send the pictures again.

    Thanks in advance.

    #2
    Hmm, does the PrintString within your OnReceiveDamage work?
    And maybe you have to plugin the "HitActor" already in the CustomEventCall? Maybe you can try displaying the HitActor-Name in the PrintString before the "ApplyDamage" node in order to check that the Actor to which the Damage is to be applied is being transferred properly. In the worst case introduce a new variable that stores the HitActor and make it replicated (set by server).

    And I don't really understand why you have the "loops" in your OnReceiveDamage-Event that goes back to the BranchNode after 0.1 seconds?
    Last edited by Hackmet; 09-21-2017, 05:41 AM.
    Check out my GTA2 remake in UE4

    Comment


      #3
      Originally posted by Hackmet View Post
      Hmm, does the PrintString within your OnReceiveDamage work?
      And maybe you have to plugin the "HitActor" already in the CustomEventCall? Maybe you can try displaying the HitActor-Name in the PrintString before the "ApplyDamage" node in order to check that the Actor to which the Damage is to be applied is being transferred properly. In the worst case introduce a new variable that stores the HitActor and make it replicated (set by server).

      And I don't really understand why you have the "loops" in your OnReceiveDamage-Event that goes back to the BranchNode after 0.1 seconds?
      All I had to do was drag the "damaged actor" pin from "Apply Damage" to the custom event, and it's working fine.
      And you're right, that loop isn't neccessary.
      Thanks!

      Comment

      Working...
      X