As some of you know I'm making a weapons upgrade mod blah blah uses combos to upgrade weapons. Ok so I've modified an arena mut to get rid of all weapons in a level and replace the default AR770 (Assault rifle) with my new "upgradeable" one, I've replaced adrenaline with Weapons Upgrade Points and am onto my first combo.
So I thought I'll try something simple - change the secondary firemode from grenade to FlakShells. Oh how wrong I was. Anyhow I've been searching for over 2 days trying to figure the damn thing out: finally came across the MultiAmmoWeapons Article on Wiki (thank god for wiki). So I now have an exec function in my new weapon:
(my wep is infinite ammo (i hope)). Anyway moving on as you can see the function replaces the grenade with the flak shell. So I think oh great so in my Uprades (Combos) I just use Upgrade(AddMinigunFire) or whatever and It will do it. So I wrote my Combo:
I know its a complete mess but you see what I'm trying to do. Theres about 70 things wrong with this combo but if you can help me out with the first three I think it will at least do something! Its driving me insane. So my questions:
Edit: Solved this one
1. Combo no worky! As in when i press up down up down (this was before adding any messed up code into the functions it was originally ComboMiniMe) it doesn't do ****! Is there a list of combos somewhere? No other people making new combos seem to have this problem!
EDIT: Ok Worked this out now from MutCrateCombo
2. How do I get at the weapon that a player is carrying from my combo? I'm just about to try some more code for this but my previous 10 attempts cause UCC errors (call will fail, missing param etc).
3. How do I make a Weapon have infinite ammo? I've tried stealing a couple of things from the SuperShockRifle but it has no effect.
Thankyou good people, any help at all will be greatly appreciated!
So I thought I'll try something simple - change the secondary firemode from grenade to FlakShells. Oh how wrong I was. Anyhow I've been searching for over 2 days trying to figure the damn thing out: finally came across the MultiAmmoWeapons Article on Wiki (thank god for wiki). So I now have an exec function in my new weapon:
Code:
class WPAssaultRifle extends UpgradeableWeapon
config(user);
......
exec function UpgradeWeapon(string Mode)
{
//Adapted from the Wiki - MultiAmmoWeapon Tut
//Thank god for you people!!!
//Can't Upgrade while your firing
if (FireMode[0].bIsFiring || FireMode[1].bIsFiring)
return;
//Stops stuff firing while Upgrading
if (Pawn(Owner) != none && Pawn(Owner).Controller != none)
{
Pawn(Owner).Controller.bFire = 0;
Pawn(Owner).Controller.bAltFire = 0;
}
if Mode == "AddScope" {
if (FireMode[1] != none)
FireMode[1].Destroy();
// primary fire
FireMode[1] = Spawn(class'XWeapons.FlakAltFire', self);
FireMode[1].ThisModeNum = 1;
FireMode[1].Weapon = self;
FireMode[1].Instigator = Instigator;
FireMode[1].AmmoClass =None; // need these two to change the ammo
}
else
{
return;
}
}
(my wep is infinite ammo (i hope)). Anyway moving on as you can see the function replaces the grenade with the flak shell. So I think oh great so in my Uprades (Combos) I just use Upgrade(AddMinigunFire) or whatever and It will do it. So I wrote my Combo:
Code:
class AddScope extends Combo;
//I know it says addscope but thats a lot harder
function StartEffect(xPawn P)
{
local Pawn Player;
local<Weapon> Upgradeable
if
if (P. == class'WeaponUpgrade.WPAssaultRifle')
WPAssaultRifle.Upgrade(AddScope);
else
return;
}
function StopEffect(xPawn P)
{
local Pawn Player;
if (Owner..Weapon == class'WPAssaultRifle')
MutWeaponsUpgrades.WPAssaultRifle.Upgrade(AddScope);
else
return;
}
defaultproperties
{
ExecMessage="Scope Upgrade Activated"
ComboAnnouncementName="Pint_sized"
keys(0)=1
keys(1)=2
keys(2)=1
keys(3)=2
}
I know its a complete mess but you see what I'm trying to do. Theres about 70 things wrong with this combo but if you can help me out with the first three I think it will at least do something! Its driving me insane. So my questions:
Edit: Solved this one
1. Combo no worky! As in when i press up down up down (this was before adding any messed up code into the functions it was originally ComboMiniMe) it doesn't do ****! Is there a list of combos somewhere? No other people making new combos seem to have this problem!
EDIT: Ok Worked this out now from MutCrateCombo
2. How do I get at the weapon that a player is carrying from my combo? I'm just about to try some more code for this but my previous 10 attempts cause UCC errors (call will fail, missing param etc).
3. How do I make a Weapon have infinite ammo? I've tried stealing a couple of things from the SuperShockRifle but it has no effect.
Thankyou good people, any help at all will be greatly appreciated!
Last edited: