Bentley
Member
When the player is spawned, I want draw_sprite_part to draw the player 1 pixel at a time. I want it to start at his feet, and rise until his head is drawn. In other words, I want to draw a 1 pixel high rectangular area at his feet (the bottom of the sprite), and increase the size of that rectangular area until it is at his head (the top of the sprite). The whole sprite will be drawn at the end.
The code I have draws him from his feet first, but draws his feet moving downward. I don't want his feet to move, and I want the rest of the sprite to be drawn upward from his feet.
Does anyone where I'm going wrong? Thanks for reading.
The code I have draws him from his feet first, but draws his feet moving downward. I don't want his feet to move, and I want the rest of the sprite to be drawn upward from his feet.
Code:
var x1, y1, x2, y2;
x1 = 0;
x2 = sprite_width;
y1 = sprite_height - y_count; // Draw the sprite, 1 px at a time, starting from his feet and ending at his head
y2 = sprite_height;
draw_sprite_part(spr_player, 0, x1, y1, x2, y2, x, y);
if (y_count < sprite_height)
{
y_count++;
}
Last edited: