Announcement

Collapse
No announcement yet.

[SOLVED] Client not dealing damage to server

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

    #16
    For future users here is the C++ code i used. Since I already had a custom C++ Blueprint Function Library all i had to do was add this new node into that. But for new users you can follow this tutorial on how to add custom Blueprint node.

    Header file:
    PHP Code:
    UFUNCTION(BlueprintCallableCategory "MyCustomCategory")
    static 
    void SetNewOwner(AActorNewOwnerAActorWeapon); 
    Source file:
    PHP Code:
    void USplashivBPLibrary::SetNewOwner(AActorNewOwnerAActorWeapon
    {
         if (!
    NewOwner == NULL && !Weapon == NULL)
         {
             
    Weapon->SetOwner(NewOwner);
         }
     } 
    Support my RTS Game (Agora) on Patreon!
    Unreal Nexus - Create Share and Experience!
    Unreal Engine 4 World-Wide User Map

    [PLUGIN] Aws Gamelift Client Plugin
    [TOOL] Create your own binary release of UE4 from GitHub source
    My UE4 Tutorials and Misc Tools

    Lead Programmer at YetiTech Studios
    Your Friendly Neighborhood
    Satheesh PV (a.k.a RyanJon2040) | Twitter, Instagram, Facebook, LinkedIn, YouTube, Google+

    Comment


      #17
      I know its a old post but I have the same problem... Clients cant damage server. I wanna know how you get through this issue... I created a new blueprint library and added your code then set the owner after spawned the weapon... but still cant get damage to server... What am I missing?

      Comment


        #18
        Originally posted by ryanjon2040 View Post

        Thank you very much for the help Omar007! Finally with your help, client now deals damage to server. Although i do now have weapon position issue in First Person i'll make another thread on Answerhub for that.
        Is the issue that the projectiles no longer come out of the right socket? Because I have that exact same problem now. The source of this problem comes from the fire on server. If it doesnt fire on server, the server wont take damage. If it does fire on server, it wont shoot correctly. How did you fix this? Please help me.

        Comment

        Working...
        X