Z
zendraw
Guest
where does game maker save the surface using this function? the manual doesnt tell.
is this code going to work anyway?
for now nothing is saved in the working_directory. if thats where it supposed to save then somthing is probably wrong with the code
its supposed to save the topleft pixel of the sprites
is this code going to work anyway?
for now nothing is saved in the working_directory. if thats where it supposed to save then somthing is probably wrong with the code
Code:
if (keyboard_check_pressed(vk_printscreen))
{
if (surface_exists(surf))
{
surface_set_target(surf);
if (ds_exists(global.grid, ds_type_grid))
{
var i=0;
var j=0;
repeat (ds_grid_width(global.grid))
{
j=0;
repeat (ds_grid_height(global.grid))
{
draw_sprite_part(global.grid[# i, j], -1, 0, 0, 1, 1, i, j);
j++;
}
i++;
}
}
surface_save(surf, 'test.png');
surface_reset_target();
surface_free(surf);
}
}
Last edited by a moderator: