• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Creating a rectangle like paint in game and setting it as a sprite

Xer0botXer0

Senpai
Hi fellow game devs,

I'm wondering if it's possible to use a drawn image or so and saving it as a sprite for an object ? can sprites be created in game ?

basically i'm going to use use mouse_x/y click position to set a starting point for drawing a rectangle, then the next click set the end point, i want to convert this rectangle into a sprite ?
 
D

DevNorway

Guest
Maybe this function may apply for what you're trying to do.
Code:
screen_save_part(nameforsprite,x,y,w,h);
 
B

bojack29

Guest
Yup. Create the drawn image to a surface and use sprite_create_from_surface to obtain the newly created sprite.
 
Top