Forged Alliance Forever Forged Alliance Forever Forums 2016-10-06T22:15:58+02:00 /feed.php?f=41&t=13274 2016-10-06T22:15:58+02:00 2016-10-06T22:15:58+02:00 /viewtopic.php?t=13274&p=136789#p136789 <![CDATA[Beam Weapon Buffs]]> I've been trying to figure out how impact buffs work for beam weaponry, particularly how to apply it.
The t2 cybran transporter uses something like this:
Code:
            Buffs = {
                    Add = {
                        OnImpact = true,
                    },
                    AppliedToTarget = true,
                    BuffType = 'STUN',
                    Duration = 2,
                    Radius = 10,
                    TargetAllow = 'MOBILE',
            },

But that yields the following when applied to beam weapons:
Code:
WARNING: Error running OnImpact script in Entity  at 15c06800: attempt to use as string a nil value
         stack traceback:
            [C]: in function `ParseEntityCategory'
            ...faforever\gamedata\lua.nx2\lua\sim\collisionbeam.lua(340): in function `DoUnitImpactBuffs'
            ...faforever\gamedata\lua.nx2\lua\sim\collisionbeam.lua(276): in function `OnImpact'
            ...iance\gamedata\lua.scd\lua\defaultcollisionbeams.lua(467): in function <...iance\gamedata\lua.scd\lua\defaultcollisionbeams.lua:458>

So if we go over to the line of "DoUnitImpactBuffs", we find the following:
Code:
        # Buffs (Stun, etc)
        if targetEntity and IsUnit(targetEntity) then
            self:DoUnitImpactBuffs(targetEntity)
        end

So I know its possible to use buffs with beams, anyone know how to get it to work?
If its important, I am trying to make a [UEF] tank with a laser beam that stuns its targets. Currently using the TDF hiro plasma cannon as the base.
Thanks!!!

EDIT: I can get around this by just using a projectile "underneath" the laser, but that's not very elegant, nor useful for future pursuits of beam-buffs!

Statistics: Posted by Dudekahedron — 06 Oct 2016, 22:15


]]>