I have this code for creating a boost flare when pressing a button.
But I would like to have the surface change direction depending on which way my character is going, whether that'd be to the left or up or down a wall. What do I need to do?
if (!surface_exists(flare)){
flare = surface_create(124, 103);
}
surface_set_target(flare);
draw_sprite(Boost, image_i, 80, 76);
gpu_set_colorwriteenable(1,1,1,0);
surface_reset_target();
draw_surface(flare,x- 80,y-64)
But I would like to have the surface change direction depending on which way my character is going, whether that'd be to the left or up or down a wall. What do I need to do?