GML (CREATE)
tabela1 = ds_map_create();
tabela2 = ds_map_create();
GML (DRAW)
var last;
highscore_clear();
last = ds_map_find_first(tabela1);
highscore_add(last, ds_map_find_value(tabela1, last));
for( i = 1; i<ds_map_size(tabela1); i+=1 )
{
last = ds_map_find_next(tabela1, last);
highscore_add(last, ds_map_find_value(tabela1, last));
}
draw_highscore(10,10,room_width/2 - 10,room_height-10);
highscore_clear();
last = ds_map_find_first(tabela2);
highscore_add(last, ds_map_find_value(tabela2, last));
for( i = 1; i<ds_map_size(tabela2); i+=1 )
{
last = ds_map_find_next(tabela2, last);
highscore_add(last, ds_map_find_value(tabela2, last));
}
draw_highscore(room_width/2 + 10,10,room_width - 10,room_height-10);
Aby dodać pozycje np:
GML
ds_map_add(tabela1, "edie", 1000);