Announcement

Collapse
No announcement yet.

Accessing config vars from a different class

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

    Accessing config vars from a different class

    I have a few classes in my mutator and I need to access the config vars from one class from another class in my mutator. How is this done. I have tried:

    making class vars -- didn't work..

    creating constants which = my config vars so I could use the .constant. -- can't assign vars to a const..

    static functions -- didn't work

    Can someone please give me a working example of accessing var values from another class? I just need to get the values!

    Thanks

    #2
    If it's clientside you could make a class that has your config stuff and access it like Class'Confsettings'.default.variablename; if it's serverside you could spawn a replicationinfo class and assign variables to it, then access it later by iterating DynamicActors

    Comment


      #3
      Originally posted by zanmato View Post
      If it's clientside you could make a class that has your config stuff and access it like Class'Confsettings'.default.variablename; if it's serverside you could spawn a replicationinfo class and assign variables to it, then access it later by iterating DynamicActors
      its clientside -- this problem with that is you cannot set default variables for config vars. This is however changed in the first patch which is out now, but you still cannot set default variables at runtime so I have no clue how else to read a variable from another class.

      Comment


        #4
        I don't understand what you mean, you can read config vars just fine with that method :-]

        Comment


          #5
          Do you mean accessing default values assigned in defaultproperties?

          something = class'ClassName'.default.VarName;

          Comment


            #6
            Here is a utility package which I have coded to get around this annoying restriction:
            http://homepage.eircom.net/~JBarrett...Tools-v0.1.zip

            Enjoy

            Comment

            Working...
            X