Draw Background

draw_background() - Draws a background at position (x,y) in the room.

Syntax

draw_background ( back, x, y );

  • back - background that the programmer has set up in the background resources such as background0
  • x - x coordinate in the room
  • y - y coordinate in the room

Explanation

draw_background() draws a background at position (x,y) in the room during run time. The background image is defined in the background resources by the programmer. The background image need not be the same size as the room.

Examples

Seasons Change

By creating a background of each season that you wish to depict, you would be able to change the seasons by changing the background. Make sure that the background images are the same size. Keep in mind that this only effects the background and further coding would need to be done if wanting to change the sprite images for the objects to reflect the season. The following would be placed into a draw event of an object.

draw_background(winter_back,0,0);  //Draws winter background in the room

Related Pages

  • Link

Backlinks