Announcement

Collapse
No announcement yet.

UScript noob needs help on first mutator

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

    #16
    Originally posted by neoflame

    However, I do not get:
    1. weapons replaced by other mutators
    2. infinite ammo for non-UT2004 weapons

    So you want your mutator to see what .u files are in your system dir, see if theres weapons inside of them, then have you spawn with them? I'm trying to better understand what you really want to do. Perhaps linking me to your concept idea thread would help?

    Comment


      #17
      http://www.ataricommunity.com/forums...hreadid=389400
      Basically, when I turn on only the mutator, I get all the UT2004 weapons. When I also add, say, SwitchArsenal, configuring it to give me a mix of CUT, Excessive, and UT2004 weapons, I want to start off with the CUT, Excessive, and UT2004 weapons I've picked. Instead, the mutator as written still gives me the default UT2004 weapons.

      Comment


        #18
        You could have the mutator give all wepaons availble on a system using:
        Code:
        local array<CacheManager.WeaponRecord> Recs;
        class'CacheManager'.static.GetWeaponList(Recs);
        This will fill the Recs array with all the weapons installed ona system

        Then you can use an iterator to give them all to the players like so:
        Code:
        local int i;
        for (i = 0; i < Recs.Length; i++)
        {
             Obj.GiveWeapon(Recs[i]);
        }
        And so on and so forth

        Comment


          #19
          *cough*
          Code:
          Obj.GiveWeapon(Recs[i].ClassName);
          *cough*



          Thanks! After that little fix, it compiled smoothly... going to go try it now...

          Comment


            #20
            Well, I know the next thing I need to implement: blacklisting/whitelisting, so I don't get the UT2004 AVRiL, the Soulrage Audio Mod AVRiL, the Excessive AVRiL, etc... for every weapon!

            My UT2004 crashed about a minute into the game with an "infinite iteration" error

            Can someone now give me a tutorial on how to use configuration files? I'll try to figure the rest out.

            Thanks!

            Comment


              #21
              It should not reitterate infinitly, try logging Recs.Length, and what ever 'i' is each loop, see if it is at least going up the list....

              As for the syntex, oops, I don't use Cache lists all that much since they do tend to list ALLL weapons, even stuff you don't need (Ball launcher from Bombing run)

              as for config files, what I do know is if you do this:

              Code:
              class mymut extends mutator
                   config(OptionalFilename);
              
              var config bool bStuff;
              
              function PreBeginPlay();
              {
                   log(bstuff);
              }
              
              static function FillPlayInfo(PlayInfo PlayInfo)
              {
                   PlayInfo.AddSetting(default.RulesGroup, "Stuff", default."Hello", 0, 1, "Check");
              }
              
              static event string GetDescriptionText(string PropName)
              {
                   if (PropName == "bStuff")
                        return default."Stuff";
              }
              When you run the mut whatever you select for bStuff will be saved to either the UT200X.ini under:
              Code:
              [filename.mymut]
              bStuff=Whatever
              if you don't put a filename after config in the class declaration
              or it will make the above entry in .ini file called whatever file name you entered.


              As a note mut's with their own config cause UT200X to pause while loading their config screen

              Comment


                #22
                Originally posted by HsoolienIt should not reitterate infinitly, try logging Recs.Length, and what ever 'i' is each loop, see if it is at least going up the list....
                It doesn't reiterate infinitely until partway through play, so I think it's just weapon overload I'll try logging though.

                Thanks for the config code, I'll get to it as soon as I can.

                Comment

                Working...
                X