Sk8dududu
Member
This is embarrassing, but I cannot waste anymore time on this. I absolutely have no idea why this isn't working, especially since I copied this code from another project that I have and it works fine there.
I am using a controller to draw sprites during the intro of the game. The sprite fades in but I cannot get it to fade out. I've even checked the image alpha to see the number go down, it reaches zero but the sprite is visibly unchanged.
Create event
Alarm 1
Alarm 2
draw event
It's so simple but my brain cannot understand the issue.
I am using a controller to draw sprites during the intro of the game. The sprite fades in but I cannot get it to fade out. I've even checked the image alpha to see the number go down, it reaches zero but the sprite is visibly unchanged.
Create event
Code:
///Variables
intro = 0;
fade_alpha = 0;
//Logo fade in alarm
alarm_set(0,30);
//Logo fade out alarm
alarm_set(1,120);
Code:
///Logo fade in
intro = 1;
Code:
intro = 2;
Code:
if intro == 1
{
draw_sprite_ext(spr_intro6,0,room_width/2,room_height/2,1,1,0,c_white,fade_alpha);
if fade_alpha < 1
{
fade_alpha += 0.005;
}
}
else if intro == 2
{
draw_sprite_ext(spr_intro6,0,room_width/2,room_height/2,1,1,0,c_white,fade_alpha);
if fade_alpha > 0
{
fade_alpha -= 0.005;
}
}