F
fxokz
Guest
Basically when a cutscene starts in my game i want black bars from both top and bottom of the view to close in to cover 2 thirds of the screen (temporary) Im trying to make the black bars start at the top and bottom of the screen and slowly come down and stop when they reached a limit so i created this script which gives me an error:
It doesnt even tell me whats wrong in the execute code box. Is there an easier way to achieve what im trying to do, am i on the right path even?
EDIT this is the bottom half that i didnt include above. theyre both in the same script. No im not happy with what ive achieved so far xd
Code:
//black bars
var b1, b2 start1, start2;
b1 = view_yview+view_hview/3;
b2 = view_yview+((-view_hview)/3);
start1 = view_yview;
start2 = view_yview+view_hview;
draw_set_colour(c_black);
draw_rectangle(view_xview, view_yview, view_xview+view_wview,start1, false);
draw_rectangle(view_xview, view_yview, view_xview+view_wview,start2, false);
if (start1 > b1) start1--;
if (start2 < b2) start2++;
It doesnt even tell me whats wrong in the execute code box. Is there an easier way to achieve what im trying to do, am i on the right path even?
EDIT this is the bottom half that i didnt include above. theyre both in the same script. No im not happy with what ive achieved so far xd
Code:
//sequence
if room = rm_cutscene
{
if timer > 1
{
timer--;
} else if timer <= 1
{
if instance_exists(obj_player)
{
if (obj_player.x < 300)
{
obj_player.x += 3;
} else if (instance_exists(obj_player))
{
if obj_player.x >= 300
{
if timer2 >1
{
timer2--;
} else if timer <= 1
{
draw_set_alpha(0.5);
draw_set_colour(c_white);
draw_rectangle((obj_player.x)+15, (obj_player.y)-20, (obj_player.x)+200, (obj_player.y)+10, false);
draw_set_colour(c_black);
draw_set_alpha(1);
draw_text((obj_player.x)+17, (obj_player.y)-15, "Where am I?")
timer3--;
if timer3 <=1
{
global.cutscene = false;
exit;
}
}
}
}
}
}
}
Last edited: