Pikifen/Object categories/Group task

Group tasks are objects that need to be cleared or moved out of the way, and to do so, several Pikmin need to work together on them. Once the combined Pikmin power reaches a certain goal amount, the task begins.

Examples of group task types include the pushable cardboard box in Pikmin, where several Pikmin need to all push together, or the electrode in Pikmin 3, where Yellow Pikmin need to pose together to transmit the current from one end to the other.

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

Overview
A group task object can be anything and do anything, but it has information on how much Pikmin power is required to get the task started, how many Pikmin can contribute at once, what type of contribution a Pikmin can do, and rules about the Pikmin's layout, work poses, and contribution methods.

Each object has a series of spots for Pikmin to stand on when they're working on it. These spots are organized into rows, and as Pikmin are tasked to work, they move to the closest free spot in the frontmost row. After all spots in that row are taken, new Pikmin go to the row behind, if any, and so on.

Group task objects are hardcoded in the engine to do whatever the script tells them, but when the required power quota is reached, the  message is sent; this should be handled by the script in order to do something. Likewise, the message  is sent if enough Pikmin leave the task such that the power goes below the required quota.

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

Mandatory

 *  : X and Y (in relative coordinates) of the leftmost point of the first row.
 *  : Same as above, but the rightmost point.

Recommended

 *  : In what way does a Pikmin contribute? Possible values are, where each Pikmin contributes by 1,  , where it depends on the Pikmin's weight,  , for each Pikmin's carry strength, and  , for each Pikmin's pushing strength. Defaults to normal.
 *  : How much combined power is required to meet the quota. Defaults to 10.
 *  : Maximum number of Pikmin that can contribute to the task. Defaults to 20.
 *  : Pikmin that are working will be facing this angle (relative to the group task object). Defaults to 0.
 *  : Pikmin that are working will be doing this pose. Possible values:,  ,  . Defaults to stopped.

Optional

 *  : Keep this much distance between each row. Defaults to 10.
 *  : How many Pikmin fit in one row. Defaults to 10.
 *  : If this object can move, it will speed up by this much for every extra unit of power put on the task beyond the goal. Defaults to 1.

Animations
Group task object types do not need any specific animations, only the ones that you call in the script.

Script
All of the group task type object's behavior is defined by the user-made script. You should add events for  to know when the power goal has been met or lost. You should also set the object's health to zero when you are done, if you don't want the Pikmin to work on it any more.

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