W
Wild_West
Guest
I'm trying to make a Surface that is set to an object's X and Y position and then drawn out from there by however much I need.
And I can't get it to draw at a specific X and Y, only covering the whole screen like in the Tutorial I used.
Anyone know how I can modify this to draw at my object's X and Y? I'm very new to surfaces and I'm not getting how to use them at all
And I can't get it to draw at a specific X and Y, only covering the whole screen like in the Tutorial I used.
Code:
Create Event:
execute code:
surface_light = surface_create( view_wview[0], view_hview[0] );
Step Event:
execute code:
if( surface_exists( surface_light ) )
{
surface_set_target( surface_light );
draw_set_colour( c_ltgray );
draw_rectangle( 0, 0, view_wview[0], view_hview[0], false );
surface_reset_target();
}
Draw Event:
execute code:
if( surface_exists( surface_light ) )
{
draw_set_blend_mode( bm_subtract );
draw_surface( surface_light, view_xview[0], view_yview[0] );
draw_set_blend_mode( bm_normal );
}