Hi all,
I was trying to make an intro for my future game and had a few problems to make the text fade in and out and scroll so i wrote a little function.
You must write your text on, let's say a pink background and import it as a sprite, make an object with it and set it to invisible, then call the function.
/*
obj = object number
x,y = object position
z =Ã, scrolling up
speed = 0-fast 10-slow
-Chronos
*/
function scrollnfade(int obj, int x, int y, int z,int speed)
{
int i=0;
SetObjectPosition(obj,x,y);
SetObjectTransparency(obj,100);
ObjectOn(obj);
Ã,Â
while(i<100)
{
SetObjectTransparency(obj,100-i);
Wait(7);
i=i+5;
}
i=0;
while(i<z)
{
Ã, SetObjectPosition(obj,x,y-i);
Ã, Wait(speed);
Ã, i++;
}
i=0;
while(i<100)
{
SetObjectTransparency(obj,i);
Wait(7);
i=i+5;
}
}
(i'm currently coding a "scroll and fade" at the same time, if you want the code i ll post it here)
I hope this can help, bye!
Handy, I'm sure people will find it usefull.
There's also this (http://www.adventuregamestudio.co.uk/games.php?action=detail&id=192) for complicated credits, and I've done fading and scrolling effects with Overlays...
----- EDIT to sharpen my point -----
It's always a better choice if you can make an effect without using a plugin.
So, Chronos, simple but nice work.
That's basically what I meant, but I just stink in presenting myself to others...
Looks like handy code, thanks -- I'll move this to the Tech Archive in a couple of days :)