Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# tmod.tmodProjectilePointer

00001 00002 00003 00004 00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068

    //POINTER PROJECTILE

    class tmodProjectilePointer extends Gameplay.SniperRifleProjectile;

    //var SniperRifleBeam beam;
    var tmodPointerBeam beam;
    var float energyModifier;

    // construct
    overloaded simulated function construct(Rook attacker, optional actor Owner, optional name Tag,
                      optional vector Location, optional rotator Rotation)
    {
        //energyModifier = Character(attacker).energy / Character(attacker).energyMaximum;  //this value modifies the beam's color intensity, pointer will always have max intensity (= 1).
        energyModifier = 2;

        damageAmt = default.damageAmt * energyModifier;

        super.construct(attacker, Owner, Tag, Location, Rotation);
    }

    simulated function ProjectileHit(Actor Other, vector TouchLocation, vector TouchNormal)
    {
        // scale knockback my energy multiplier

        local Vector momentum;

        momentum = normal(velocity) * knockback;

        victim = Other.Name;

        Other.TakeDamage(damageAmt, Instigator, TouchLocation, momentum, damageTypeClass, 1.0-knockbackAliveScale);

        endLife(Other, TouchLocation, TouchNormal);
    }

    simulated function PostBounce(Projectile newProjectile)
    {
        //local SniperRifleProjectile srProj;
        local tmodProjectilePointer srProj;

        srProj = tmodProjectilePointer(newProjectile);

        srProj.energyModifier = energyModifier;
        srProj.damageAmt = damageAmt;

        //new class'SniperRifleBeam'(srProj);
        new class'tmodPointerBeam'(srProj);     //we have our custom beam class for this weapon

        super.PostBounce(srProj);
    }

    simulated function Destroyed()
    {
        if (beam != None)
            beam.onProjectileDeath();

        super.Destroyed();
    }

    defaultproperties
    {
        damageAmt=0.000000
        LifeSpan=0.100000
        Knockback=-60000.000000
        DrawScale3D=(X=0.100000,Y=0.100000,Z=0.100000)
        damageTypeClass=class'tmodPointerDamageType'
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

Class file time: po 8.1.2018 22:01:56.000 - Creation time: st 23.5.2018 00:10:47.890 - Created with UnCodeX