i always prefered making a new weapon, that way i can see ALL the original code and tinker with it to my will. his way works too, its a bit easier also
Originally posted by simianangel
make sure that your new codes dont have any import lines, they usually reside at the top and start with the word "EXEC".
these are the lines that import information like sounds, models, textures and the such, all of which are already loaded by the origional ripper so delete them unless you are importing your own custom models.
class MyRipper extends ripper;
defaultproperties
{
ProjectileClass=Class'MyPackage.MyRipperBlade'
}
class MyRipperBlade extends Razor2;
auto state Flying
{
simulated function HitWall (vector HitNormal, actor Wall)
{
local vector Vel2D, Norm2D;
NumWallHits=1;
bCanHitInstigator = true;
PlaySound(ImpactSound, SLOT_Misc, 2.0);
LoopAnim('Spin',1.0);
if ( (Mover(Wall) != None) && Mover(Wall).bDamageTriggered )
{
if ( Role == ROLE_Authority )
Wall.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), MyDamageType);
Destroy();
return;
}
SetTimer(0, False);
MakeNoise(0.3);
if ( NumWallHits == 1 )
{
Spawn(class'WallCrack',,,Location, rotator(HitNormal));
Vel2D = Velocity;
Vel2D.Z = 0;
Norm2D = HitNormal;
Norm2D.Z = 0;
Norm2D = Normal(Norm2D);
Vel2D = Normal(Vel2D);
if ( (Vel2D Dot Norm2D) < -0.999 )
{
HitNormal = Normal(HitNormal + 0.6 * Vel2D);
Norm2D = HitNormal;
Norm2D.Z = 0;
Norm2D = Normal(Norm2D);
if ( (Vel2D Dot Norm2D) < -0.999 )
{
if ( Rand(1) == 0 )
HitNormal = HitNormal + vect(0.05,0,0);
else
HitNormal = HitNormal - vect(0.05,0,0);
if ( Rand(1) == 0 )
HitNormal = HitNormal + vect(0,0.05,0);
else
HitNormal = HitNormal - vect(0,0.05,0);
HitNormal = Normal(HitNormal);
}
}
}
Velocity -= 2 * (Velocity dot HitNormal) * HitNormal;
SetRoll(Velocity);
}
}
defaultproperties
{
LifeSpan=0.000000
}
class MyRipperMUT extends Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
If (Other.IsA('ripper') && !Other.IsA('MyRipper'))
{
ReplaceWith(Other,"MyRipper.MyRipper");
Return False;
}
Return True;
}
Originally posted by FireSlash
it gets annoying after a while...
tink.. tink... tink.... tink tink.... tink...