Skip to content

anonymous functions confuse the parser #1

@walachey

Description

@walachey

If I have an effect with the new effect syntax, tooltip positions are off, "Open Declaration" does some random stuff, and more.

Example for copy-pasting

local RoundhouseKickEffect = new Effect
{
    Construction = func()
    {
        this.anim = this.Target->PlayAnimation("RoundhouseKick", CLONK_ANIM_SLOT_Arms, Anim_Linear(0, 0, GetAnimationLength("RoundhouseKick"), 30, ANIM_Hold));
        this.particles = 
        {
            Size = PV_Linear(0, 2),
            Alpha = PV_Linear(100, 0),
            BlitMode = GFX_BLIT_Additive
        };
        this.particles = Particles_Colored(this.particles, this.Target->GetColor());
    },
    Destruction = func()
    {
        if (this.Target)
            this.Target->StopAnimation(this.anim);
    },
    Timer = func()
    {
        this.Target->CreateParticleAtBone("SphereSpark", "skeleton_arm_hand.L", [0, 0, 0], [0, 0, 0], 15, this.particles, 1);
        this.Target->CreateParticleAtBone("SphereSpark", "skeleton_arm_hand.R", [0, 0, 0], [0, 0, 0], 15, this.particles, 1);
    }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions