Forged Alliance Forever Forged Alliance Forever Forums 2016-03-26T20:17:46+02:00 /feed.php?f=41&t=12099 2016-03-26T20:17:46+02:00 2016-03-26T20:17:46+02:00 /viewtopic.php?t=12099&p=123853#p123853 <![CDATA[Help : create a napalm kamikaze weapon]]>
I want to create a T3 Mobile bomb that creates a napalm explosion doing damage overtime.

I got the Fx good but for whatever reason can't get the napalm to work when the unit explodes.

Help and advice welcomed.

I tried this :

Code:
CMobileKamikazeBombWeapon1 = Class(KamikazeWeapon){

   FxDeath = CybranmodedweaponsEffectTemplates.CMobileKamikazeBombExplosion1,

   CreateProjectileForWeapon = function(self, bone)
        local projectile = self:CreateProjectile(bone)
        local damageTable = self:GetDamageTable()
        local blueprint = self:GetBlueprint()
        local data = {
            Instigator = self.unit,
            Damage = blueprint.DoTDamage,
            Duration = blueprint.DoTDuration,
            Frequency = blueprint.DoTFrequency,
            Radius = blueprint.DamageRadius,
            Type = 'Normal',
            DamageFriendly = blueprint.DamageFriendly,
        }

        if projectile and not projectile:BeenDestroyed() then
            projectile:PassData(data)
            projectile:PassDamageData(damageTable)
        end
        return projectile
    end,


    OnFire = function(self)

      local army = self.unit:GetArmy()


        for k, v in self.FxDeath do

            CreateEmitterAtBone(self.unit,-2,army,v)

        end

      KamikazeWeapon.OnFire(self)
    end,

}

Statistics: Posted by Krapougnak — 26 Mar 2016, 20:17


]]>