Pikifen/Object categories/Decoration

Decorations are simple objects that do nothing but decorate the area. They just idle, and change animation when bumped against, making them great for decorative plants.

Examples of decoration types include Clovers or Margarets.

To create a new type of decoration, please follow the creating object types tutorial.

Overview
A decoration type object simply idles and changes to a different animation when it's bumped by any moving object. Having an object touch it, but not moving, will cause it to use the idle animation, so it only looks like it's brushed against when it's actually being, well, really brushed against. Because most of these are plants, and plants in the real world, even from the same species, come in all shapes and sizes, a decoration object type can have data on how to randomize the look of each decoration object in the area.

Decoration type objects are hardcoded in the engine to spawn with a random tint, rotation, scale, and animation offset, and they're programmed to sit there and change animation when touched by a moving object.

Attributes
Besides the global object type attributes, a decoration type has the following attributes.

Mandatory
None.

Recommended
None.

Optional

 *  : If true, the first frame of each object's idle animation when spawning will be decided at random, instead of always being the first one. Useful if you have several different decorative objects together, and don't want them to look like they're all moving in sync. Defaults to false.
 *  : When an object of this type spawns, its angle will be randomly shifted clockwise or counterclockwise, randomly between 0 degrees and these many degrees. Defaults to 0.
 *  : When an object of this type spawns, its scale will be randomly increased or decreased, by a random factor between 0 and this much. 0.1 is a good general-case value. Defaults to 0.
 *  : When an object of this type spawns, it will be tinted randomly. This color (format  or  ) is the maximum tint that it can undergo, and the engine will pick a random color to tint it with between this color and full white (i.e. no tint). If you specify an alpha channel, the object's transparency will be decided randomly (but independently) too, between this value and 255 (full opacity). Defaults to transparent black.

Animations
A decoration type needs to have the following animations:


 *  : Just idling.
 *  : When it's been bumped against.

Script
A decoration type's script cannot be changed.

Object spawn script variables
Besides the global spawn script variables, decoration type objects do not read any specific script variables.