• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Surface effect not converting from GMS1, Need Advice

DyadGames

Member
Hey I followed the part 2 of surfaces GM tutorial It's a ripple effect, I created it it just fine but when I throw it into GMS 2 It seems to be showing my texture sheet instead?



Im not sure what to do to make the affect work again but in GMS2. Any Ideas?

Here is the draw event for the surface object
Code:
if !surface_exists(surf)
{
    surf = surface_create(room_width,room_height);
    surface_set_target(surf);
    draw_clear_alpha(c_black,0);
    surface_reset_target();
    view_surface_id[0] = surf;
}
Cheers!
Alex
 
C

ChaosTheory

Guest
Hey I followed the part 2 of surfaces GM tutorial It's a ripple effect, I created it it just fine but when I throw it into GMS 2 It seems to be showing my texture sheet instead?



Im not sure what to do to make the affect work again but in GMS2. Any Ideas?

Here is the draw event for the surface object
Code:
if !surface_exists(surf)
{
    surf = surface_create(room_width,room_height);
    surface_set_target(surf);
    draw_clear_alpha(c_black,0);
    surface_reset_target();
    view_surface_id[0] = surf;
}
Cheers!
Alex
It looks like you need to call draw_surface() to render your surface to the application_surface. I've never tried that view_surface_id[0] trick; I always use draw_surface(), or some variant thereof.
 
Top