Page 1 of 1
Need to Delay a Scrolling Bitmap when it Starts
Posted: Fri Dec 06, 2013 6:35 pm
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
Re: Need to Delay a Scrolling Bitmap when it Starts
Posted: Mon Dec 09, 2013 4:10 pm
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.
Re: Need to Delay a Scrolling Bitmap when it Starts
Posted: Mon Dec 09, 2013 7:49 pm
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
Re: Need to Delay a Scrolling Bitmap when it Starts
Posted: Mon Dec 09, 2013 9:52 pm
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();
}
Re: Need to Delay a Scrolling Bitmap when it Starts
Posted: Tue Dec 10, 2013 2:38 am
by MarkC
Thanks! That works great... So few lines of code, yet so powerful!
.
Mark
Re: Need to Delay a Scrolling Bitmap when it Starts
Posted: Tue Dec 10, 2013 11:12 am
by Wissmann
i am glad i could help.