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 IconDraw Self
Draw Value IconDraw Value
Draw Transformed Value IconDraw Transformed Value
Draw Sprite IconDraw Sprite
Draw Sprite Transformed IconDraw Sprite Transformed
Draw Stacked Sprites IconDraw Stacked Sprites
Draw Rectangle IconDraw Rectangle
Draw Gradient Rectangle IconDraw Gradient Rectangle
Draw Ellipse IconDraw Ellipse
Draw Gradient Ellipse IconDraw Gradient Ellipse
Draw Line IconDraw Line
Draw Healthbar IconDraw Healthbar
Draw Instance Score IconDraw Instance Score
Draw Instance Health IconDraw Instance Health
Draw Instance Lives IconDraw Instance Lives
Set Draw Colour IconSet Draw Colour
Get Draw Colour IconGet Draw Colour
Set Draw Alpha IconSet Draw Alpha
Get Draw Alpha IconGet Draw Alpha
Set Font IconSet Font
Get Font IconGet Draw Font
Set Text Alignment IconSet Text Alignment
Get Text Alignment IconGet Text Alignment