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:
Announcement
Collapse
No announcement yet.
Unlimited Shield?
Collapse
X
-
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
-
In UnlimitedShieldGun.uc:
Code:class UnlimitedShieldGun extends ShieldGun; defaultproperties { FireModeClass(1)=UnlimitedShieldAltFire }
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 }
How to get the above code to work, on the other hand, is your responsibility...
Comment
-
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
-
@ 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
-
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); }
Comment
-
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
Comment