BlueBot5000
Member
So as i go about shaun's tutorial here
i finally finish my transition and polish it before the moment of truth...
and my transition did not work pressing "R" did the first transition part but it did NOT de-transition! it's just a blank black screen how can i fix this?
CREATE EVENT
STEP EVENT
DRAW GUI
SCRIPT
i finally finish my transition and polish it before the moment of truth...
and my transition did not work pressing "R" did the first transition part but it did NOT de-transition! it's just a blank black screen how can i fix this?
CREATE EVENT
Code:
/// @description Size Some Variables And Mode Setup
w = display_get_gui_width();
h = display_get_gui_height();
h_half = h * 0.5;
enum TRANS_MODE
{
OFF,
NEXT,
GOTO,
RESTART,
INTRO
}
mode = TRANS_MODE.INTRO; //0 = Off, 1 = Next, Remember That!
percent = 1;
target = room;
Code:
/// @description Progress Our Transition
if (mode != TRANS_MODE.OFF)
{
if (mode == TRANS_MODE.INTRO)
{
percent = max(0,percent - max((percent/10),0.005));
}
else
{
percent = min(1,percent + max(((1 - percent)/10),0.005));
}
if (percent == 1.4) || (percent == 0)
{
switch (mode)
{
case TRANS_MODE.INTRO:
{
mode = TRANS_MODE.OFF;
break;
}
case TRANS_MODE.NEXT:
{
mode = TRANS_MODE.INTRO;
room_goto_next();
break;
}
case TRANS_MODE.GOTO:
{
mode = TRANS_MODE.INTRO;
room_goto(target);
break;
}
case TRANS_MODE.RESTART:
{
room_restart();
break;
}
}
}
}
Code:
/// @description Draw Our Fade Effect
if (mode != TRANS_MODE.OFF)
{
draw_set_color(c_black);
draw_rectangle(0,0,w,percent*h_half,false);
draw_rectangle(0,h,w,h-(percent*h_half),false);
}
draw_set_color(c_white);
draw_text(50,50,string(percent));
Code:
function SlideTranstition()
{
with (objRoomChangingController)
{
mode = argument[0];
if (argument_count > 1) target = argument[1];
}
}