F
FireflyX91
Guest
Hello all, I am having a slight problem with trying to draw a sprite to a surface. The problem being that when I view "sur.png", the saved surface, it is just displaying as a blank image with the map_width and map_height dimensions that I have specified. Anyway here's the code I have in my objects Draw event:
If anybody can let me know what's wrong, your help would be appreciated
Thanks for your time
Code:
var map_width = 224;
var map_height = 448;
if(!surface_exists(surface)){
surface = surface_create(map_width,map_height);
}
surface_set_target(surface);
draw_sprite(spr_hm1,-1,0,0);
surface_save(surface,"sur.png");
surface_reset_target();
Thanks for your time