Nuke Damage Not Reading?

Need help? This is the right place!
Note, reporting bugs and issues should be in the Tech Support forum!

Moderator: PhilipJFry

Nuke Damage Not Reading?

Postby Stormrideron » 26 Feb 2017, 22:19

Hello FAFers, I am trying to get this code to read the new changes for Nuke Damage. Somehow this doesn't read the changes for Nuke damage, unlike bp.Economy - What am I missing for from this?

Code: Select all
      local NukeRadiusMulti = 1.1
      local NukeDamageMulti = 1.25
      local projectileBpFiles = {}
      local NUKE

      for _, bp in all_bps.Unit do
         if not bp.Categories then
            continue
         end
         for k, cat in bp.Categories do
            if cat == 'NUKE' then
               NUKE = true
            end
         end
      
         if NUKE and bp.Weapon then
            for i, wepBp in bp.Weapon do
               if wepBp.TargetRestrictOnlyDisallow and wepBp.TargetType == 'RULEWTT_Projectile' then
                  table.insert(projectileBpFiles, string.lower(wepBp.ProjectileId))
               end
            end
         end
      end

    for _, bp in all_bps.Projectile do
        if table.find(projectileBpFiles, bp.Source) then
            if bp.Weapon then
                if bp.Weapon.NukeInnerRingDamage then
                    bp.Weapon.NukeInnerRingDamage = bp.Weapon.NukeInnerRingDamage * NukeDamageMulti
                end
                if bp.Weapon.NukeOuterRingDamage then
                    bp.Weapon.NukeOuterRingDamage = Weapon.NukeOuterRingDamage * NukeDamageMulti
                end
                if bp.Weapon.NukeInnerRadiusDamage then
                    bp.Weapon.NukeInnerRadiusDamage = bp.Weapon.NukeInnerRadiusDamage * NukeRadiusMulti
                end
            if bp.Weapon.NukeOuterRadiusDamage then
                    bp.Weapon.NukeOuterRadiusDamage = bp.Weapon.NukeOuterRadiusDamage * NukeRadiusMulti
                end
            end
        end
    end


Code: Select all
    Weapon = {
        {
            NukeInnerRingDamage = 70000,
            NukeInnerRingRadius = 25,
            NukeOuterRingDamage = 5000,
            NukeOuterRingRadius = 60,
},

      {
            Damage = 10000,
            DamageFriendly = true,
            DamageRadius = 6,
            DamageType = 'Normal',
            DisplayName = 'Death Weapon',
            DummyWeapon = true,
            Label = 'DeathWeapon',
            WeaponCategory = 'Death',
        },
    },
Stormrideron
Crusader
 
Posts: 28
Joined: 20 Feb 2017, 00:05
Has liked: 1 time
Been liked: 4 times
FAF User Name: Stormrideron

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest