Effect Scaling

ScatterScatter Join Date: 2012-09-02 Member: 157341Members, Squad Five Blue
Is it possible to scale the size of muzzle effects like that of the welder?

Have tried { [kEffectParamScale] = 5 } but to no avail.

Thanks

Comments

  • FehaFeha Join Date: 2006-11-16 Member: 58633Members
    Should be possible.

    This is a piece of code from my watermod, where I do some splashing effects:
    local function SplashEffects(self, waterentity, point, submersionPercentage)
    if self:GetIsAlive() then
    if Server and waterentity.splashsound then
    Shared.PlayWorldSound(nil, waterentity.splashsound, nil, point, waterentity.splashvolume or 1)
    end

    if Client and waterentity.splashcinematics then
    local cinematic = Client.CreateCinematic(RenderScene.Zone_Default)
    cinematic:SetCinematic(waterentity.splashcinematics)
    cinematic:SetRepeatStyle(Cinematic.Repeat_None)
    cinematic:SetIsVisible(true)
    local cinematicCoords = self:GetCoords()
    cinematicCoords.origin = point + Vector(math.random()*1 - 0.5, 0, math.random()*1 - 0.5)
    cinematicCoords.xAxis = cinematicCoords.xAxis * waterentity.splashscale.x
    cinematicCoords.yAxis = cinematicCoords.yAxis * waterentity.splashscale.y
    cinematicCoords.zAxis = cinematicCoords.zAxis * waterentity.splashscale.z
    cinematic:SetCoords(cinematicCoords)
    end
    end
    end
    Player.OnEnterWater = SplashEffects
    Player.OnExitWater = SplashEffects
    As you can see, it gets the Coords of the effect, then scales it, and sets the new Coords for it.
Sign In or Register to comment.