Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

AkasukiHJ

1
Posts
A member registered Oct 18, 2021

Recent community posts

Hey Shaun, i'm on the final episode but i'm having a little problem, the sTextBoxBG sprites that are supposed to be used for save slots won't appear for some reason, here's the code for oTitleScreen:

create-

titleVisible = 0.0;

keyPressed = false;

slotsVisible = 0.0;

slotSelected = 0;

loadingStarted = false;

for (var _slot = 0; _slot <= 2; _slot++)

{

var _fileName = "save" + string(_slot) + ".sav";

if (file_exists(_fileName))

{

slotData[_slot] = LoadJSONFromFile(_fileName);

}

else slotData[_slot] = -1;

}

step-

if (!keyPressed)

{

titleVisible = min(1, titleVisible + 0.01);

}

else

{

titleVisible = max(0, titleVisible - 0.01);

slotsVisible = min(1, slotsVisible + 0.01);

}

if (keyboard_check_pressed(vk_anykey)) keyPressed = true;

drawGUI-

if (titleVisible > 0) 

{

draw_sprite(sTitle,0,0,-RESOLUTION_H + titleVisible * RESOLUTION_H);

draw_set_alpha(titleVisible * abs(sin(get_timer() * 0.000001 * pi)));

draw_sprite(sTitle,1,0,0);

draw_set_alpha(1.0);

}

if (slotsVisible > 0) 

{

draw_set_alpha(slotsVisible)

for (var _slot = 0; _slot <= 2; _slot++)

{

var _y = 16+_slot*48

var _x = 160;

var _img = 2;

if (slotSelected == _slot)

{

_img = 3;

draw_sprite(sMenuPlayer,0,_x-32,_y+24);

}

NineSliceBoxStretched(sTextBoxBg,_x,_y,312,_y+48,_img);

}

draw_set_alpha(1.0);

}