Announcement

Collapse
No announcement yet.

Recurring problem.

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

    Recurring problem.

    Its really starting to annoy me and i do not see why its happening.

    I create a new class based off an old one, doesnt matter if its a weapon or a vehicle ( all i have attempted for now ).
    No matter what i actually attempt to do all that changes is the name of the item im trying to create.

    At the moment im wanting to change the firerate and ammo capacity of the redeemer.

    I have my new file xDestroyerAmmo and in its default properties i have MaxAmmo set to 50 and InitialAmount set to 20. Nothing happens. Just like changing the scorpion, i could change the name but not its groundspeed or steering speed.

    #2
    Well, we might need more info on it. Are you compiling your classes, did you subclass it or copy and make a new one, do you have a mutator to change it...

    I would assume you have done all these cause you see the name change. Where are you testing this. Im not sure, but I think weapon lockers may have their own ammo ammount...

    Also, post some code, we can't just guess what you have coded...

    Comment


      #3
      Ok here is my code for my redeemer alterations;

      Code:
      /*
      =================================================================
      
       xDestroyer
      
       Super Redeemer Pickup class
      
      =================================================================
      */
      class xDestroyerPickup extends RedeemerPickup;
      
      defaultproperties
      {
              InventoryType = class'xDestroyer'
              PickupMessage = "You got the xDestroyer"
      }
      
      
      
      
      /*
      =================================================================
      
       xDestroyer
      
       Super Redeemer Inventory class
      
      =================================================================
      */
      class xDestroyer extends Redeemer;
      
      defaultproperties
      {
              FireModeClass( 0 )  = class'xDestroyerFire'
              ItemName            = "xDestroyer"
              PickupClass         = class'xDestroyerPickup'
      }
      
      
      
      
      
      
      /*
      =================================================================
      
       xDestroyer
      
       Super Redeemer Fire class
      
      =================================================================
      */
      class xDestroyerFire extends RedeemerFire;
      
      defaultproperties
      {
              FireRate = 0.1                      // default is 1.0
      }
      
      
      
      
      
      
      
      /*
      =================================================================
      
       xDestroyer
      
       Super Redeemer Ammo class
      
      =================================================================
      */
      class xDestroyerAmmo extends RedeemerAmmo;
      
      defaultproperties
      {
              MaxAmmo         = 50
              InitialAmount   = 20
              ItemName        = "xDestroyer Ammo"
      }
      
      
      
      
      
      
      
      
      
      /*
      =================================================================
      
       xDestroyer
      
       Super Redeemer Projectile class
      
      =================================================================
      */
      class xDestroyerProjectile extends RedeemerProjectile;
      
      defaultproperties
      {
          Speed       = 3000.0
          MaxSpeed    = 3000.0
      }

      All in their relevant files of course.

      Comment


        #4
        What about the mutator?
        Or are you placing those already in a map?

        Comment


          #5
          Im using the summon command.

          Comment


            #6
            I think you forgot to define secondary fire class (of weapon fire) that would shoot your custom projectiles. (Or I'm just blind?)

            Other things should work however. If not you may try to include package name also when reffering to class name.

            Comment


              #7
              Yea, I was thinking you should try:

              defaultproperties
              {
              FireModeClass( 0 ) = class'MyPackage.xDestroyerFire'
              ItemName = "xDestroyer"
              PickupClass = class'MyPackage.xDestroyerPickup'
              }

              If that doesnt work, PM me with a link or email me the file and I will check it out.

              Comment


                #8
                Tried including the package name in the class reference but nothing happened.

                Here is the link to the exact dir structure that iv tried;

                http://ruinerr.syn-dev.net/xDestroyer.zip

                Comment


                  #9
                  /*
                  ================================================== ===============

                  xDestroyer

                  Super Redeemer Fire class

                  ================================================== ===============
                  */
                  class xDestroyerFire extends RedeemerFire;

                  defaultproperties
                  {
                  FireRate = 0.1 // default is 1.0
                  }

                  You need to add these lines in the default properties:

                  AmmoClass=Class'Xdestroyer.xdestroeyrAmmo'
                  ProjectileClass=Class'Xdestroyer.xdestroyerProject ile'

                  So it looks like this:

                  /*
                  ================================================== ===============

                  xDestroyer

                  Super Redeemer Fire class

                  ================================================== ===============
                  */
                  class xDestroyerFire extends RedeemerFire;

                  defaultproperties
                  {
                  FireRate = 0.1 // default is 1.0
                  AmmoClass=Class'Xdestroyer.xdestroeyrAmmo'
                  ProjectileClass=Class'Xdestroyer.xdestroyerProject ile'
                  }

                  Comment


                    #10
                    Yep ta, need to make sure they all link to MY classes.
                    Ill have another look at modding the scorpion and see what i can come up with.

                    Comment


                      #11
                      Its not so much specifying using your classes... UT2k4 is quite good for not needing to do so. Its more the fact that you totally omitted which ammo or projectile you wanted to use so it used the old ones. As CMan said your xDestroyerFire class only stated a new fire rate, nothing else.

                      Comment


                        #12
                        Yea, but it subclassed the redeemer, so any properties you don't define, it defaults to those of the deemer.

                        Comment


                          #13
                          Yer what i meant was i had modified the ammo and projectile class but i didnt use them in the fire class so it just used the redeemers ammo and projectile class.

                          I got my new vehicle working too.

                          And yet another question . . .

                          How do i go about putting these modifications into a mutator so i can use these in a mp game and not just instant action and summoning them.

                          Iv looked at some of the mutators and i understand how to create a mutator and can see how the mutators such as regen or quadjump work, but i cannot think of how to whack these new classes into one? That or i have the completly wrong idea about doing it so i can distribute the modifications.

                          Comment

                          Working...
                          X