Announcement

Collapse
No announcement yet.

Unlimited Shield?

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

    Unlimited Shield?

    Is there any way for me to get the Shield Gun's secondary fire shield to have an unlimited charge? I'm trying to create a map for my clan where you need to use bio jumps, and you can only perform 1 jump before you have to let the shield recharge. So is there anything like that out there, or would i have to teach myself coding...? :noob:

    #2
    Would require some coding, basically make it either
    1. Charge up way faster
    2. Not use as much when in use...

    Comment


      #3
      There might be something like that out, but if you decide to do it yourself create a custom ShieldGun, set the AltFire to a custom class extended from ShieldAltFire, in which you set AmmoPerFire to 0 in the default properties and then extend the Timer function, modifying it so it doesn't use up ammo.

      Comment


        #4
        Thanx, no I just have to figure out how to do that. :noob:

        EDIT: :cry: I'm so noobish that I can't find the right program to find the code.

        EDIT agian: Nevermind. Unreal Wiki is my friend.

        Comment


          #5
          In UnlimitedShieldGun.uc:
          Code:
          class UnlimitedShieldGun extends ShieldGun;
          
          defaultproperties
          {
              FireModeClass(1)=UnlimitedShieldAltFire
          }
          In UnlimitedShieldAltFire.uc:
          Code:
          class UnlimitedShieldAltFire extends ShieldAltFire;
          
          function Timer()
          {
              if (!bIsFiring)
              {
                  RampTime = 0;
                  if ( !Weapon.AmmoMaxed(1) )
                      Weapon.AddAmmo(1,1);
                  else
                      SetTimer(0, false);
              }
              else
              {
                      if (Weapon.ClientState == WS_ReadyToFire)
                          Weapon.PlayIdle();
                      StopFiring();
              }
              
              SetBrightness(false);
          }
          
          defaultproperties
          {
              AmmoPerFire=0
          }
          Could probably be made more elegant, and won't work if someone decides they want to make a shieldgun pickup in a map. Otherwise, it should work (not sure about UnlimitedShieldAltFire::Timer though.)

          How to get the above code to work, on the other hand, is your responsibility...

          Comment


            #6
            Well. Thanks 2 u! Now I just have to get this ucc make command to work right. :sour: (Nono, don't help. I learn from crazy things. :bulb: )

            EDIT: Ok. I got most of it, but when i do a ucc dumpint MutUnlimitedShieldGun.u , no .int file is created, and the tutorials say one should be there.

            Comment


              #7
              You aren't making a mutator with the aforementioned code. You are making a whole new weapon and it's fire type. (it's just inheriting the majority of its code from its parent classes) After you've made those two scripts, toss them in a folder like say:

              c:\ut2004\unlimitedshieldgun\classes\ (both files here)

              then open your ut2004.ini and find all the EditPackages= lines and add:

              EditPackages=UnlimitedShieldGun

              then open a dos prompt and, well to be easy, just type:

              c:\ut2004\system\ucc make

              After that you'll have an

              UnlimitedShieldgun.u

              in which you can use a weapons mutator that comes with unreal to replace all X weapon type with "UnlimitedShieldGun".

              Just choose weapon arena mutator or something, and the UnlimitedShieldGun weapon will be there.

              Thats kinda how I started, bro. I think I said everything right even again I'm kinda noob myself

              Still, if you wanted to replace the shield gun they get on startup you'd have to change the defaultweapon(0)= in the xplayer. (at least i think its xplayer...)

              somethin' like:

              class MyDood extends xPlayer

              defaultproperties
              {
              DefaultWeapon(0)=UnlimitedShieldGun.UnlimitedShiel dGun
              }


              but then you'd have to get everyone to be your playerclass...

              So all in all I'm just gonna shut up and let a pro help you more because then you'd need a mutator to make everyone your playerclass or like a gametype maybe, really easy.

              I don't know enough off the top of my head I hope this information ends up being at least a little helpful, bro.

              gl

              Comment


                #8
                in fact, the topic starter is making a map, so he wouldnt need a weapon mutator to replace his schieldguns, he could just put his modified shieldgun in the map

                Comment


                  #9
                  @ PlayerPawn:

                  You're right! It is in Arena! But, since I am a complete noob who started only yesterday......(and thought this would be simple, which its not!), can someone help me make a mutator so people start with it instead of a normal Shield Gun, so I can embed it into my map?


                  @ -GSF-JohnDoe:

                  I tried making it a weapon, but when I picked it up, it didn't go to my inventory.

                  Comment


                    #10
                    Oh, it's as a pickup. Then you also have to create a custom WeaponPickup using the UnlimitedShieldGun instead of the normal ShieldGun, and make the xWeaponBase use the UnlimitedShieldGunPickup (or whatever).

                    Though if you want people to start off with the UnlimitedShieldGun you could just:
                    Code:
                    function string GetInventoryClassOverride(string InventoryClassName)
                    {
                        switch (InventoryClassName)
                        {
                            case "XWeapons.ShieldGun": if (bShieldGun) return "UnlimitedShieldGun";
                        }
                        return Super.GetInventoryClassOverride(InventoryClassName);
                    }
                    The above should work.

                    Comment


                      #11
                      What he is saying is...

                      You made the weapon. You made it's fire mode.

                      Now you need to make it's pickup class. Unlike UT99, you just don't plop the weapon down on the map and pick it up. Now, Unreal has a seperate script made for it being dropped on the world. Fun, yes?

                      A good example was given above, but not necessarily needed if you want to make a mutator to have people start with it.

                      I'd have to look into how to do that myself. If you don't get sufficent help by tomorrow night, I'll write up something-- right now I gotta hit the sack so I'm not wasted for work tomorrow.

                      Comment


                        #12
                        I'd also suggest looking at the weapon tutorial on the wiki, they show what classes you may need, what they are/do and how to make and use them.

                        Comment

                        Working...
                        X