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.

Mutate Function

Discussion in 'Ask a Coder' started by SkullKrusher, Sep 26, 2005.

  1. SkullKrusher

    SkullKrusher New Member

    Joined:
    Sep 4, 2004
    Messages:
    25
    Likes Received:
    0
    ok this seems to work but i can only enable or disable the bool once and then on next map i can enable or disable only once again is this just the way it is ???

    thanks much

    Code:
        //// Enalbe Bool
    
        case "EnableBool":
    
              if ( !BoolStyle )
              {
                   class'ServerMut'.default.BoolStyle = True;
                   Sender.ClientMessage("Bool Now Enabled");
                   Sender.ClientMessage("Changes take Effect on Map change / restart");
                   Log("_________________________");
                   Log("");
                   Log("  Bool now Enabled  ");
                   Log("_________________________");
              }
              class'ServerMut'.static.StaticSaveConfig();
    
        break;
    
        //// Disable Bool
    
        case "DisableBool":
    
              if ( BoolStyle )
              {
                   class'ServerMut'.default.BoolStyle = False;
                   Sender.ClientMessage("Bool now Disabled");
                   Sender.ClientMessage("Changes take Effect on Map change / restart");
                   Log("_________________________");
                   Log("");
                   Log("  Bool now Disabled  ");
                   Log("_________________________");
              }
              class'ServerMut'.static.StaticSaveConfig();
    
        break;
    
     
  2. EvilDrWong

    EvilDrWong Every line of code elevates you

    Joined:
    Jun 16, 2001
    Messages:
    932
    Likes Received:
    0
    Hrm... My best guess would be to include changing the BoolStyle for your current actor as well as the default for the class. That, or checking the default value of it instead of that instance's property.

    Code:
    if(default.BoolStyle)
    
    or
    Code:
    if(BoolStyle)
    {
        BoolStyle=!BoolStyle;
        <yadda yadda yadda>
    }
    
    I could be wrong though, it's been an incredibly long time ;)
     

Share This Page