Pikifen/Object categories/Bridge

Bridges are objects that start off as just a stub, and when Pikmin are done working on them, they form a full bridge over an obstacle that anything can walk on.

Examples of bridge types include the wooden bridge from Pikmin, that starts as a stub Pikmin work on and gets fully built when they are done, the red ceramic bridge from Pikmin 3, that starts as a stub and grows as Pikmin collect shards and drop them on the bridge, etc.

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

Overview
The bridge object serves as something for the Pikmin to work on. Once its health is fully depleted, it changes to a "destroyed" animation, and several bridge sectors are created nearby. As such, in order for a bridge to work, you need to place both a bridge object and some bridge sectors. See the area tutorial for more information. Some bridges are built by having the Pikmin attack it (e.g. Pikmin wooden bridge). Others are built by having the Pikmin deliver some sort of resource into the bridge (e.g. Pikmin 3 ceramic bridge).

Bridge type objects are hardcoded in the engine to sit there and have their health depleted in some way, and when it reaches 0, they change animation and edit the surrounding bridge sectors's texture and height.

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

Mandatory

 *  : File name of the texture to use for the bridge's main floor, extension included. This is what the bridge sectors will use. This texture should be in.
 *  : Same as above, but the texture to use for the railing.

Recommended
None.

Optional
None.

Animations
A bridge type needs to have the following animations:


 *  : Under construction, and is just idling.
 *  : Fully built.

Script
A bridge type's script cannot be changed.

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