Drawing Action Library

Drawing Action LibraryThe 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 to draw it, using an action like Draw Self. Basically, GameMaker 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 Icon Draw Self
Draw Value Icon Draw Value
Draw Transformed Value Icon Draw Transformed Value
Draw Sprite Icon Draw Sprite
Draw Sprite Transformed Icon Draw Sprite Transformed
Draw Stacked Sprites Icon Draw Stacked Sprites
Draw Rectangle Icon Draw Rectangle
Draw Gradient Rectangle Icon Draw Gradient Rectangle
Draw Ellipse Icon Draw Ellipse
Draw Gradient Ellipse Icon Draw Gradient Ellipse
Draw Line Icon Draw Line
Draw Healthbar Icon Draw Healthbar
Draw Instance Score Icon Draw Instance Score
Draw Instance Health Icon Draw Instance Health
Draw Instance Lives Icon Draw Instance Lives
Set Draw Colour Icon Set Draw Colour
Get Draw Colour Icon Get Draw Colour
Set Draw Alpha Icon Set Draw Alpha
Get Draw Alpha Icon Get Draw Alpha
Set Font Icon Set Font
Get Font Icon Get Draw Font
Set Text Alignment Icon Set Text Alignment
Get Text Alignment Icon Get Text Alignment