PDA

View Full Version : Weapon Replacement for DeathMatch


[FU2]SpawnKiller
23rd Nov 2003, 09:39 AM
How can I reset this to run from a bool so that I can pick and choose which rifle to use??


function ModifyPlayer(Pawn Other)
{
DeathMatchPlus(Level.Game).GiveWeapon(Other,"SniperRifles_v102.ZarkAssaultRifle");

if ( NextMutator != None )
NextMutator.ModifyPlayer(Other);
}


This is what I am using else where but with the DeathMatchPlus(Level.Game).GiveWeapon I am unsure how to recode this


if (Other.IsA('SniperRifle') && bGiveCustomSniperRifle )
{
ReplaceWith(Other,"SniperRifles_v102.CustomSniperRifle");
return false;
}

if (Other.IsA('SniperRifle') && bGiveZarkAssaultRifle )
{
ReplaceWith(Other,"SniperRifles_v102.ZarkAssaultRifle");
return false;
}



THANKS

[FU2]SpawnKiller
24th Nov 2003, 06:40 PM
this works with an ini file


bUseCustomSniperRifle, //CustomSniperRifle
bUseZarkAssaultRifle, //ZarkAssaultRifle
bUseCustomWeaponMut; //Toggle for Custom Weapon Mutator








function ModifyPlayer(Pawn Other)
{
if ( bUseCustomWeaponMut )
{
If ( bUseCustomSniperRifle )
{
DeathMatchPlus(Level.Game).GiveWeapon(Other,"SniperRifles_v102.CustomSniperRifle");
return;
};

If ( bUseZarkAssaultRifle )
{
DeathMatchPlus(Level.Game).GiveWeapon(Other,"SniperRifles_v102.ZarkAssaultRifle");
return;
}

}


if ( NextMutator != None )
NextMutator.ModifyPlayer(Other);
}