ProtoFlux:Equip Tool: Difference between revisions

From Resonite Wiki
Created a page for the Equip Tool node.
 
rewrite, add additional info
 
Line 17: Line 17:
|}}
|}}


The <code>Equip Tool</code> node makes a user equip a [[Tools|tool]] to their hand of a specific side of that user.
The '''Equip Tool''' node equips a [[Tools|tool]] to the [[user]], optionally dequipping an existing tool.


== Inputs ==
== Inputs ==
Line 23: Line 23:
=== * ([[Impulses|Call]]) ===  
=== * ([[Impulses|Call]]) ===  


Calls an impulse to equip a tool to a user.
Receives an impulse to equip the tool to a user.


=== Tool ([[Type:ITool|ITool]]) ===
=== Tool ([[Type:ITool|ITool]]) ===


The tool to equip.
The tool to equip.
If the tool is null or the tool is already equipped <code>OnEquipFail</code> will fire.


=== User ([[User]]) ===
=== User ([[User]]) ===


The user to equip the tool to.
The user to equip the tool to.
If the user is null then the [[ExecutionContext|execution context's]] local user will be used, and if that local user is null then <code>OnEquipFail</code> will fire.


=== Side ([[Type:Chirality|Chirality]]) ===
=== Side ([[Type:Chirality|Chirality]]) ===


The side of the user to equip this tool.
The chirality of the user to equip this tool.
 
If an [[Component:InteractionHandler|interaction handler]] for the side can not be found then <code>OnEquipFail</code> will fire.


=== DequipExisting ([[Type:bool|bool]]) ===
=== DequipExisting ([[Type:bool|bool]]) ===


Should this tool dequip an already held tool.
Should this tool dequip an already held tool.
If an another tool is already equipped and <code>DequipExisting</code> is false then <code>OnEquipFail</code> will fire.


== Outputs ==
== Outputs ==
Line 45: Line 53:
=== OnEquipped ([[Impulses|Continuation]]) ===
=== OnEquipped ([[Impulses|Continuation]]) ===


Fires when the tool successfully equips to a user.
Fires if the tool successfully equips to a user.


=== OnEquipFail ([[Impulses|Continuation]]) ===
=== OnEquipFail ([[Impulses|Continuation]]) ===


Fires when the tool fails to equip to a user for any reason.
Fires if the tool fails to equip.


[[Category:ProtoFlux:Tools]]
[[Category:ProtoFlux:Tools]]

Latest revision as of 04:09, 18 April 2025

Equip Tool
*
OnEquipped
Tool
OnEquipFail
User
Side
DequipExisting
Tools

The Equip Tool node equips a tool to the user, optionally dequipping an existing tool.

Inputs

* (Call)

Receives an impulse to equip the tool to a user.

Tool (ITool)

The tool to equip.

If the tool is null or the tool is already equipped OnEquipFail will fire.

User (User)

The user to equip the tool to.

If the user is null then the execution context's local user will be used, and if that local user is null then OnEquipFail will fire.

Side (Chirality)

The chirality of the user to equip this tool.

If an interaction handler for the side can not be found then OnEquipFail will fire.

DequipExisting (bool)

Should this tool dequip an already held tool.

If an another tool is already equipped and DequipExisting is false then OnEquipFail will fire.

Outputs

OnEquipped (Continuation)

Fires if the tool successfully equips to a user.

OnEquipFail (Continuation)

Fires if the tool fails to equip.