Author Topic: Event - Brick Flash  (Read 698 times)

Brick Flash
On Activate > Self > BrickFlash
Makes a brick quickly change it's color to white (or the brightest possible color), and then reverts back to the original after 400ms (the delay could be specified by the user)


to white (or the brightest possible color)
or, a specified color. White if they want it, similar color, or some other color.

Sounds like a nice shortcut for a common and tedious pair of events

yeah that's also a great idea, a specified color would be fantastic.

or, a specified color.

registerOutputEvent(fxDTSBrick, flashBrick, "paintColor 0" TAB "int 0 30000 400");

function fxDTSBrick::flashBrick(%this, %color, %time)
{
    if (isEventPending(%this.flashBrickSchedule))
    {
        cancel(%this.flashBrickSchedule);
    }
    else
    {
        %this.flashBrickRevert = %this.getColorID();
    }

    %this.setColor(%color);
    %this.flashBrickSchedule = %this.schedule(%time, setColor, %this.flashBrickRevert);
}

This can already be done with the setColor event (+setColorFX Glow for a fancier effect) but I suppose you want to do it with just one line of events?

i just want a short way of doing a quick change to Glow personally