Announcement

Collapse
No announcement yet.

Do I need to call this(specified function in description) in this place?

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

    Do I need to call this(specified function in description) in this place?

    DO I need to call this function on a server?
    I have a SHealthComponent (which handles the incoming damage) and ExplosiveBarrel -- owns the SHealthComponent and add explosion effects

    ExplosiveBarrel.h
     
    Spoiler

    ExplosiveBarrel.cpp
     
    Spoiler


    SHealthComponent.h
     
    Spoiler

    SHealthComponent.cpp
     
    Spoiler

    #2
    Oh, only after a restarting the VS I have seen that this is not working w/o this function, So if you do something like this, you should call a function in this situation.

    Comment


      #3
      OnRep gets called on the clients when necessary as in if the value has changed. OnRep isn't called on the server.

      Comment


        #4
        Originally posted by GarnerP57 View Post
        OnRep gets called on the clients when necessary as in if the value has changed. OnRep isn't called on the server.
        Excellent, thank you for your reply!

        How should I call it in BP(if I set RepNotify on a variable, and then it creates a function wich can not be placed, so i can call it in any way in BP as it says: "This function was not called as blueprint callable")?
        Last edited by EminentEIement; 02-18-2020, 05:18 PM.

        Comment


          #5
          Blueprint RepNotify also gets called on the server but in C++ you need to call the OnRep_ function manually if you want it to be called on the server.

          Comment


            #6
            Originally posted by GarnerP57 View Post
            Blueprint RepNotify also gets called on the server but in C++ you need to call the OnRep_ function manually if you want it to be called on the server.
            Thanks, I do appreciate your help!

            Comment

            Working...
            X