maybe this can help ...
here is the window.
when the mouse touches buttons "1" and "2" the image of "map_front" is changed.
i have a global variable "automap" which is set to 0 when the mouse is not on any button and to 1 or 2 if it is over one of the buttons [ every button has a script which checks MouseEntry and MouseLeave and sets "automap"
the entity map_front has a while (true) loop that changes its image according to the variable "automap"
thats all working.
now i want the image of "map_front" not to appear but to fade in and this is not working.
neither by script nor by sprite with 15 frames with changing alpha value...
its just alpha 0 and than alpha 255 - no inbetweens
here is the map_front script:
#include "scripts\base.inc"
var i;
while ( true)
{
if (automap !=0)
{
if (automap ==1) this.SetSprite ("interface/K4_1.sprite");
else if (automap ==2) this.SetSprite ("interface/K4_2.png");
/*this.AlphaColor = RGB (255,255,255,0); // this was the non sprite approach
for (i=0;i<=255;i=i+15)
{
this.AlphaColor = RGB (255,255,255,i);
Sleep (60);
}
this.AlphaColor = RGB (255,255,255,255);
*/}
else this.SetSprite ("interface/automap_front.png");
Sleep (50);
}
and here is a button script:
#include "scripts\base.inc"
////////////////////////////////////////////////////////////////////////////////
on "MouseEntry"
{
automap=1;
}
on "MouseLeave"
{
automap=0;
}