YesNoOk
avatar

Static background element parameters (Stages) (Read 3037 times)

Started by JustNoPoint, November 02, 2015, 04:26:13 pm
Share this topic:
Static background element parameters (Stages)
New #1  November 02, 2015, 04:26:13 pm
  • ******
    • www.justnopoint.com/
type = normal ; (required) (string) This specifies that this background element is a static sprite.

spriteno = groupno, imageno ; (required) (int, int) groupno, imageno specifies the sprite in the SFF to display for this background element.

layerno = layer ; (optional) (int) If layer is 0, the background element will be drawn behind the characters. If layer is 1, the element will be drawn in front of the characters. Within each layer, background elements are drawn back-to-front in the order they appear in the DEF file. Defaults to 0.

start = x,y ; (optional) (float, float) Specifies the background element's starting position with respect to the top center of the screen. Positive x values go right; positive y values go down. The values are given in stage units, which correspond to pixel units in typical use. Defaults to 0,0.

delta = dx,dy ; (optional) (float, float) Specifies how many pixels the background element should scroll for each pixel of camera movement in the horizontal and vertical directions, respectively. Setting delta=1,1 will cause the background element to move at the same speed as the camera. 1,1 is an appropriate value for the ground under the characters' feet. For elements off in the distance, use smaller values of delta to create the illusion of depth. Similarly, elements in the foreground (layerno = 1) should usually be given deltas larger than 1. Defaults to 1,1.

mask = mask ; (optional) (boolean) If mask is set to 1, color 0 of the sprite will not be drawn. This is used in drawing objects which are not rectangular in shape. For performance reasons, mask should be set to 0 when not needed. This parameter is ignored for RGB sprites. Defaults to 0 normally. For historical reasons, mask will default to 1 if the trans parameter is set to add or sub.

tile = x_tile,y_tile ; (optional) (int, int) Specifies if the background element is to be repeated ("tiled") in the horizontal and/or vertical directions, respectively. A value of 0 specifies no tiling, a value of 1 specifies infinite tiling, and any value greater than 1 will cause the element to tile that number of times. If this line is omitted, no tiling will be performed.

tilespacing = x_spacing,y_spacing ; (optional) (int, int) If tiling is enabled, this line specifies the space to put between separate instances of the tile in the horizontal and vertical directions, respectively. There is no effect if tiling is not enabled. tilespacing defaults to 0,0.
Last Edit: March 15, 2017, 09:16:04 am by Odb718