Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_simtown_reset_cursor

(view raw script w/o annotations or w/e)
1
function scr_simtown_reset_cursor
scr_simtown_reset_cursor

function scr_simtown_reset_cursor() { if (GameOver == 0) { for (i = 0; i < 16; i += 1) { for (j = 0; j < 6; j += 1) { if (TileYouCanBuild[i][j] == 1) { CursorX = i; CursorY = j; CursorVisualX = cameray() + (i * 40); CursorVisualY = cameray() + (j * 40) + 80; exit; } } } } }
()
2
{
3
    if (GameOver == 0)
4
    {
5
        for (i = 0; i < 16; i += 1)
6
        {
7
            for (j = 0; j < 6; j += 1)
8
            {
9
                if (TileYouCanBuild[i][j] == 1)
10
                {
11
                    CursorX = i;
12
                    CursorY = j;
13
                    CursorVisualX = cameray() + (i * 40);
14
                    CursorVisualY = cameray() + (j * 40) + 80;
15
                    exit;
16
                }
17
            }
18
        }
19
    }
20
}