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.

Copying Var's and Rep Info

Discussion in 'Programming' started by BrownCow, Sep 8, 2001.

  1. BrownCow

    BrownCow I Heart Gnat.

    Jun 18, 2000
    Likes Received:
    Ok, since this is the only real problem i've been having with uscript, i'll ask it.

    I make a mutator, the mutator has 1 config var. It is a boolean lets say.

    I subclass a player class. In ModifyPlayer i write this line of code:

    Pawn(Other).myBool = myBool;

    Obviously i didn't subclass that class, but this is what i'm doing w/o getting into details.

    Now, if i log the Pawn's myBool var, it will be correct. WHen it comes time, in game to actually use it, it is blank. Like the bool is None, not false, not true, None.

    First question, why the hell can you not do that? It is never going to be changed, i don't understand why i'd have to use Replication to do something as simple as this.

    Unless i don't. If i don't, please tell me how to do something as simple as copying a boolean from mutator to class w/o using replication.

    And lets say i did replication, i would do this in my player class:

    reliable if( ROLE == ROLE_AUTHORITY )

    is that correct? That would say, server send this bool to the client.

    i've read all the stupid tuts and faq's, for the most part, they are next to useless for the stuff that really matters. If anyone could help, that would be great.


Share This Page