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 flask , container in game maker room

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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -