1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Non-serious replication questions

Discussion in 'Programming' started by EvilDrWong, Jan 1, 2004.

  1. EvilDrWong

    EvilDrWong Every line of code elevates you

    Joined:
    Jun 16, 2001
    Messages:
    932
    Likes Received:
    0
    This is something thats boggled me for a while (though it has no real impact on anything) but what would happen with MyVar replication wise if it were replicated like this:
    Code:
    reliable if(True==True)
        MyVar;
    

    Or this:
    Code:
    reliable if(FRand()<0.5)
        MyVar;
    
     
  2. (v)adOnion

    (v)adOnion chroot /

    Joined:
    Feb 19, 2002
    Messages:
    44
    Likes Received:
    0
    The same thing that will always happen will happen - if the condition is true it will be replicated, if it is false it will not be.
     
  3. EvilDrWong

    EvilDrWong Every line of code elevates you

    Joined:
    Jun 16, 2001
    Messages:
    932
    Likes Received:
    0
    but which 'direction' will it be going? :p Will the data get all mashed up as the client tries to tell the server what to do with it, while the server tries to tell the client what to do with it?
     
  4. JamesKilton

    JamesKilton UA Coder

    Joined:
    Oct 6, 2002
    Messages:
    210
    Likes Received:
    0
    I remember reading, on the Wiki I believe, that using function calls in replication statements is a bad idea as it has a chance of causing serious slowdown. As for true=true, I have no clue.
     
  5. Tynan

    Tynan Person

    Joined:
    Jan 13, 2003
    Messages:
    130
    Likes Received:
    0
    Actually, both of them should keep the server an client in pretty good sync with each other. The question becomes what happens if the variable changes on one end. Theres a chance it could be changed back by replication before changing the var on the other end.
     
  6. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,915
    Likes Received:
    36
    I don't think variable replication works in the client-to-server direction, no matter what you specify in the replication condition.

    What about simply coding a class with this type of replication to see what happens?
     
  7. Tynan

    Tynan Person

    Joined:
    Jan 13, 2003
    Messages:
    130
    Likes Received:
    0
    Its works for AutonomousProxy actors and their children.
     

Share This Page