Pikifen/Object categories/Leader

A type of leader represents a playable character. Since you can have any number of instances of the same type in the same area, you can effectively have multiple Olimars roaming about. Whether you want to or not is up to you though! At least one leader is required to be in the area in order to play it.

Examples of leader types include Olimar, Louie, Alph, etc.

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

Overview
A leader is any character that the player controls directly. When there are multiple leaders in the area, the player can swap between them. Leaders can whistle Pikmin into their group, throw them, punch, dismiss, etc.

Leader objects are hardcoded in the engine to be controlled by the player's input and to have "active" and "inactive" states, depending on whether the player is controlling them right now or not. They can idle, whistle, punch, hold a Pikmin or another leader, throw it, dismiss, spray around, flinch or get knocked back when hurt, die, follow a group, pluck, sleep, be held and thrown, and drink a drop.

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

Mandatory

 *  : Name of the image file with the leader's icon. This icon is used on the HUD. The image should be in, and the extension of the file name must also be included.

Recommended
None.

Optional

 *  : Name of the sound file to play when this leader dismisses. The sound should be in, and the extension of the file name must be included. If not set, no sound will play. Defaults to not set.
 *  : When thrown, the leader reaches this height at the apex of the throw. For reference, a standard Pikmin has this set to 260, and leaders have this set to 130. Defaults to 130.
 *  : Same as, but the sound the leader makes when they are switched to. Defaults to not set.
 *  : How much time it takes before the Pikmin comes out. Defaults to 0.6.
 *  : Maximum range the whistle can cover. Defaults to 80.
 *  : Same as, but the sound the leader's regular whistle makes. Defaults to not set.

Animations
A leader object type needs to have the following animations:


 *  : Just standing still.
 *  : Walking.
 *  : Plucking a Pikmin sprout.
 *  : Getting up from a lying down position.
 *  : Ordering their group to dismiss.
 *  : Throwing a Pikmin or leader.
 *  : Blowing the whistle.
 *  : Punching.
 *  : Starts lying down and stays down.
 *  : Reels back in pain.
 *  : Knocked down to the ground, and then gets up.
 *  : Spraying around.
 *  : Bending down to drink a drop.

Script
A leader type's script cannot be changed.

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