Draw Actions Library


Drawing Actions

The Drawing action library is where you can find the actions required to draw sprites, text or shapes as well as set certain draw properties. Most of these actions are only for use in the various Draw Events of an object, and may not work if used outside of the Draw Event. The exceptions to this are the Set actions, which can be added to any event and will affect all drawing for all instances afterwards.

It is important to note that if you add any actions into the main Draw Event of an object, then it will not draw the sprite that has been assigned to the instance unless you explicitly tell GameMaker Studio 2 to draw it, using an action like Draw Self. Basically, GameMaker Studio 2 will default draw any sprite assigned to an instance, only if there is nothing else in the Draw Event.

The Draw actions available are as follows:

Draw Self Draw Self
Draw Value Draw Value
Draw Transformed Value Draw Transformed Value
Draw Sprite Draw Sprite
Draw Sprite Transformed Draw Sprite Transformed
Draw Stacked Sprites Draw Stacked Sprites
Draw Rectangle Draw Rectangle
Draw Rectangle Gradient Draw Gradient Rectangle
Draw Ellipse Draw Rectangle
Draw Gradient Ellipse Draw Gradient Ellipse
Draw Line Draw Line
Draw Healthbar Draw Healthbar
Draw Instance Score Draw Instance Score
Draw Instance Health Draw Instance Health
Draw Instance Lives Draw Instance Lives
Set Draw Colour Set Draw Colour
Get Draw Colour Get Draw Colour
Set Draw Alpha Set Draw Alpha
Get Draw Alpha Get Draw Alpha
Set Font Set Font
Set Text Alignment Set Text Alignment