Pikmin Fanon will close on September 1st (see here for details and discussion).
A full-history page and file archive is available for download here (mirror).
Wayback Machine archive can be found here. Partial Wikia archive here.

Difference between revisions of "Pikifen/Object categories/Tool"

From Pikmin Fanon
Jump to: navigation, search
m
(Version 0.18!)
Line 22: Line 22:
  
 
=== Optional ===
 
=== Optional ===
 +
*'''<code>dropped_when_pikmin_is_whistled</code>''': If true, the Pikmin will drop the tool when it is whistled. Defaults to false.
 
*'''<code>dropped_when_pikmin_lands</code>''': If true, the Pikmin will drop the tool when the Pikmin lands on the floor. Defaults to true.
 
*'''<code>dropped_when_pikmin_lands</code>''': If true, the Pikmin will drop the tool when the Pikmin lands on the floor. Defaults to true.
 
*'''<code>dropped_when_pikmin_lands_on_opponent</code>''': If true, the Pikmin will drop the tool when the Pikmin lands on the an opponent. Defaults to false.
 
*'''<code>dropped_when_pikmin_lands_on_opponent</code>''': If true, the Pikmin will drop the tool when the Pikmin lands on the an opponent. Defaults to false.

Revision as of 13:22, 8 February 2020

A tool object is anything that can be picked up by a Pikmin and have the Pikmin hold it until it is needed later. Most of the time, this is when the Pikmin is thrown.

Examples of tool types include the bomb rock, which can be carried around and explodes when dropped, and the mine from Bingo Battle, which sticks to surfaces and objects and explodes when a leader draws near.

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

Overview

Tool object types dictate what happens when the Pikmin picks them up, and what happens when they are dropped. They also specify when they can and cannot be picked up, be it by Pikmin or by enemies, and when exactly it is that they get activated. Their behavior is specified by the user-made script.

Tool type objects are hardcoded in the engine to be chased out by the Pikmin (when appropriate), picked up, released, and optionally, get stuck to an object.

Attributes

Besides the global object type attributes, a tool type has the following attributes.

Mandatory

  • icon: Icon to show on the HUD standby bubble, representing Pikmin that are holding a tool of this type.

Recommended

None.

Optional

  • dropped_when_pikmin_is_whistled: If true, the Pikmin will drop the tool when it is whistled. Defaults to false.
  • dropped_when_pikmin_lands: If true, the Pikmin will drop the tool when the Pikmin lands on the floor. Defaults to true.
  • dropped_when_pikmin_lands_on_opponent: If true, the Pikmin will drop the tool when the Pikmin lands on the an opponent. Defaults to false.
  • pikmin_returns_after_using: If true, the Pikmin will return to the current leader after it drops the tool. Defaults to true.
  • stuck_when_pikmin_lands_on_opponent: If true, and if the Pikmin drops when it lands on an opponent, then the tool will become stuck to the opponent object. Defaults to false.

Animations

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

Script

All of the tool type object's behavior is defined by the user-made script. It is recommended that you use the set_holdable action at some point to make it so Pikmin can hold the tool, and listen out to the on_held and on_released events, to know when the tool has been picked up, and is ready to be used.

Object spawn script variables

Besides the global spawn script variables, tool type objects do not read any specific script variables, but any script variable fed into them can be used in the script.