Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

tmod.tmodProjectilePlasma


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
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
class tmodProjectilePlasma extends EquipmentClasses.ProjectileBurner config(tribesmodSettings);

var bool bEndedLife;
//Burner projectile does not have radiusDamageSize and radiusDamageMomentum by default
var() float radiusDamageSize;
var() float radiusDamageMomentum;
//projectile
var config float damage;
var config float knockback;
var config float damageAOE;
//weapon 
var config string localizedName;
var config bool useDefaultBurner;
var config float PlasmaPIVF;
var config float PlasmaVelocity;
var config float PlasmaEnergyUsage;
var config bool canBeDeflected;
var config float PlasmaLifeSpan;

simulated function PreBeginPlay() {

    super.PreBeginPlay();
    SaveConfig();
}

/**
 * Unregistered hit fix. From NRBgone.
*/
function ProjectileTouch(Actor Other, vector TouchLocation, vector TouchNormal){
    super.ProjectileTouch(Other, TouchLocation, TouchNormal);
}

simulated function ProjectileHit(Actor Other, vector TouchLocation, vector Normal) {
    endLife(Other, TouchLocation, Normal);
    super.ProjectileHit(Other, TouchLocation, Normal);
}

simulated function endLife(Actor HitActor, vector TouchLocation, Optional vector TouchNormal) {
    //local float speed;
    local Vector direction;

    SpawnBurningArea();

    if (bEndedLife)
        return;

    bEndedLife = true;

    HurtRadius(damage, radiusDamageSize, damageTypeClass, radiusDamageMomentum, TouchLocation, HitActor, direction);

    Super.endLife(None, TouchLocation, TouchNormal);
}

simulated function triggerHitEffect(Actor HitActor, vector TouchLocation, vector TouchNormal, optional Name HitEffect) {
    SpawnBurningArea();
}

simulated function BurnTarget(Rook target) {
}

simulated function SetProperties() {
 
    class'tmodProjectilePlasma'.default.damageAmt = damage;
    class'tmodProjectilePlasma'.default.radiusDamageSize = damageAoe;
    class'tmodProjectilePlasma'.default.knockbackAliveScale = knockback;
    class'tmodProjectilePlasma'.default.bDeflectable = canBeDeflected;
    
    class'tmodProjectilePlasma'.default.LifeSpan = PlasmaLifeSpan;    
    class'tmodProjectilePlasma'.default.ignitionDelay = PlasmaLifeSpan;
}

defaultproperties
{
    radiusDamageSize=400.000000
    ignitionDelay=4.25000000
    burningAreaClass=Class'tmodPlasmaArea'
    bDeflectable=False
    knockbackAliveScale=1.000000
    StaticMesh=None
    
    DrawScale3D=(Z=2.000000)
    CollisionRadius=30.000000
    CollisionHeight=30.000000
     
    damage=50.000000
    damageAoe = 400.000000
    knockback = 1.000000
    PlasmaLifeSpan=4.250000
    canBeDeflected = false
     
    localizedName = "Plasma Gun"
    useDefaultBurner = false
    PlasmaPIVF = 0.500000
    PlasmaVelocity = 4900.000000
    PlasmaEnergyUsage = 10.000000
}

Overview Package Class Source Class tree Glossary
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.884 - Created with UnCodeX