Announcement

Collapse
No announcement yet.

Variable Texture Ini happy fun quiz

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

  • Variable Texture Ini happy fun quiz

    i know this isnt alien swarm specific, but doesn anyone know how i can get a variable from an external file, like an int or an ini?
    for example the location of a texture =p (yes just for example, this is in no way what im trying to do at all.. really )
    okitnxbye
    ..it's safer here.

  • #2
    Open the ini and have a look?

    Comment


    • #3
      Originally posted by Baz
      i know this isnt alien swarm specific, but doesn anyone know how i can get a variable from an external file, like an int or an ini?
      for example the location of a texture =p
      Add "config(filename)" to your class and the config keyword to the variables you want to define in the ini, as in:
      Code:
      class BazLoadingScreens extends AoLoadingVignette2KFour
               config(BazTextures);
      
      var config array<string> PrettyScreens;
      (Just an example, not that it's related to what you're trying to do..)

      Then assign the variables in BazTextures.ini.

      More detailed info
      --

      Comment


      • #4
        Oh you were talking from within UnrealScript.

        Comment


        • #5
          Originally posted by Butters
          (Just an example, not that it's related to what you're trying to do..)
          he knows too much

          ya sorry carth, ill be more specific in future
          ..it's safer here.

          Comment


          • #6
            ok this has to do with the loading screen thingo, im trying to get it to display text

            Code:
            AddJustifiedText( StripMap( MapName ), 0, fontX, fontY, 1.2, 1.2,).DrawColor = Class'Canvas'.static.MakeColor( 0, 0, 0);
            now this works fine, it displays some black text on the right of the screen
            the problem is how it works, it boggles my mind.
            ive never seen a function followed by .AnyThing= before.

            i dont know much about oop so im wondering has it got something to do with the fact that the class im writing isnt passed a canvas, so thats how its meant to change a state of the canvas. and is there anyway to pass more than 1 change?
            for instance MakeColor(0,0,0) and TextSize() on the same line or at least a way of changing a state of the canvas on a line on its own.
            i think my problem is that all the stuff ive read on the wiki assumes a canvas is passed to the class.
            wow what a rant
            ..it's safer here.

            Comment


            • #7
              I believe that line you have there would be roughly equivalent of:

              UberText = AddJustifiedText( StripMap( MapName ), 0, fontX, fontY, 1.2, 1.2,);
              UberText.DrawColor = Class'Canvas'.static.MakeColor( 0, 0, 0);


              Meaning that the AddJustifiedText not only creates the text, but also returns a pointer to it. Right after that, you change the DrawColor value of that text to black.

              Make sense?
              Ah, to be a hero. Keeping such company...

              Comment


              • #8
                oh silly me, it makes sense when you put it like that. sorta makes more sense now whats going on =)
                ..it's safer here.

                Comment

                Working...
                X