gml - How to pour liquid in game maker? -
i want put water sprite inside flask , when drag on top of container pour water container. know how in game maker? , here picture of flask , container
you use rectangle visible through sprites of recipients , change it's scale when pour it. example, link it's image_yscale variable quantity of poured liquid.
if motivated, shaders solution. otherwise, design flat-bottomed recipients, make them transparent, , use draw event draw liquid-colored rectangle inside of them before drawing them. result won't astonishing, far easier.
your draw event ;
1 - draw rectangle @ x & y coordinates (you may have use offset), correct scale using image_xscale & image_yscale, , correct angle flask's image_angle variable.
2 - draw recipient after that.
Comments
Post a Comment