Need to Delay a Scrolling Bitmap when it Starts

Write here what nice effects or shows you have done with MADRIX or ask other users.

Moderator: MADRIX Team

Locked
MarkC
Posts: 18
Joined: Thu Jul 29, 2010 2:19 am

Need to Delay a Scrolling Bitmap when it Starts

Post by MarkC »

Greeting,

I have a tall bitmap that I am scrolling upwards. Right now it starts scrolling as soon as the effect is started (I am remotely triggering effects through E1.31).

Is there a way to have the bitmap delay the scrolling for maybe a half second when that effect is triggered? I'd like the original image to be on the grid for a bit before it scrolls off. I'm thinking that maybe a small script attached to the effect could accomplish this if I knew where to start...

Thanks for any help or direction!!!

Mark
User avatar
Wissmann
Developer
Developer
Posts: 774
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Need to Delay a Scrolling Bitmap when it Starts

Post by Wissmann »

Here you can see all the macro commands which are available for the SCE Bitmap effect.

http://help.madrix.com/m2/html/script/i ... itmap.html

The command you are looking for is SetDirection.
LEDs are nothing without control ;-)
MarkC
Posts: 18
Joined: Thu Jul 29, 2010 2:19 am

Re: Need to Delay a Scrolling Bitmap when it Starts

Post by MarkC »

Thank you for your reply. I am familiar with the scripting and have written a couple dozen scripts. What I was having a hard time accomplishing is getting the bitmap to NOT scroll for the first half second. Then, begin scrolling up.
.
Could I initially have scrolling turned off, then use one of the scripting commands to delay scrolling for a half second (or some number of frames), and then turn scrolling on? The delay is what I'm having trouble accomplishing.
.
Thanks for your help!
.
Mark
User avatar
Wissmann
Developer
Developer
Posts: 774
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Need to Delay a Scrolling Bitmap when it Starts

Post by Wissmann »

ok, try this

Code: Select all

@scriptname="delayed movement";
@author="S.Wissmann - inoage GmbH";
@version="MADRIX 2.14";
@description="start movement in x*0.2 sec";

int f = 0;
int start = 0;

void InitEffect()
{
    SetDirection(DIR_NONE);

	//if Movement is stopped we get 5 frames per second
	start = 2;	//3rd frame == 0.6 sec
}

void PreRenderEffect()
{
	if(f == start)
		SetDirection(DIR_UP);
	
    f++;
}

void PostRenderEffect()
{

}

void MatrixSizeChanged()
{
	InitEffect();
}
LEDs are nothing without control ;-)
MarkC
Posts: 18
Joined: Thu Jul 29, 2010 2:19 am

Re: Need to Delay a Scrolling Bitmap when it Starts

Post by MarkC »

Thanks! That works great... So few lines of code, yet so powerful!
.
Mark
User avatar
Wissmann
Developer
Developer
Posts: 774
Joined: Fri Feb 23, 2007 3:36 pm
Location: Germany
Contact:

Re: Need to Delay a Scrolling Bitmap when it Starts

Post by Wissmann »

:-) i am glad i could help.
LEDs are nothing without control ;-)
Locked