The Dink Network

load_tile()

July 30th 2015, 08:17 PM
wizardg.gif
leprochaun
Peasant He/Him Japan bloop
Responsible for making things not look like ass 
How does this work?

void load_tile(string[191] tile_bmp, int tile_index);
load_tile replaces the tiles at tile_index with tile_bmp.

I've been trying to use this command but I can't seem to get it to work.
I've tried simply loading the tiles. I've tried loading the tiles then drawing the screen. I've tried loading the tiles then saving and loading the game. I've tried writing the load_tile() line every which way. Nothing has worked.

Can someone please provide an example script in where load_tile does indeed replace tiles?

July 30th 2015, 11:54 PM
wizardg.gif
leprochaun
Peasant He/Him Japan bloop
Responsible for making things not look like ass 
nevermind, figured it out.
thanks scratcher.

In case anyone else gets stuck

test with this

void main()
{
load_tile("tiles\ts35.bmp", 8);
load_screen();
draw_background();
}


You can use draw_screen() instead of draw_background() but then scripts will run again and you don't want that. Especially if you run the change through a main(). Then you're in insta-crash territory.