D
Den
Guest
So I have made an outline that appears over an enemy when the mouse goes over it but I can't figure out a good way to draw the outline in the left direction without using rotate, but if I use rotate it just stretches the outline.
I'm pretty new to drawing code so It could just be something obvious lol.
Here's the drawing code:
I'm pretty new to drawing code so It could just be something obvious lol.
Here's the drawing code:
Code:
///Draw The Outline
draw_self();
//Set the color
var outline_color = c_black;
//Draw the sprite 1 pixel off in each direction
if(position_meeting(mouse_x, mouse_y, Enemy_Parent)) {
draw_sprite_ext(sprite_index, -1, x - 1, y, 1, 1, 0, outline_color, 1);
draw_sprite_ext(sprite_index, -1, x + 1, y, 1, 1, 0, outline_color, 1);
draw_sprite_ext(sprite_index, -1, x, y - 1, 1, 1, 0, outline_color, 1);
draw_sprite_ext(sprite_index, -1, x, y + 1, 1, 1, 0, outline_color, 1);
//Draw the regular sprite at origin
draw_sprite(sprite_index, -1, x, y);
}