Blockland Forums > Suggestions & Requests

Event - Brick Flash

Pages: (1/2) > >>

alex dude:

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)

SWAT One:

Yes please.

Teneksi:


--- Quote from: alex dude on December 27, 2013, 04:17:23 AM ---to white (or the brightest possible color)

--- End quote ---
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

alex dude:

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

Port:


--- Quote from: Eksi on December 27, 2013, 05:24:51 AM ---or, a specified color.

--- End quote ---

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);
}

Pages: (1/2) > >>

Go to full version