Create Decrement value page |
added link to impulses |
||
Line 26: | Line 26: | ||
== Inputs == | == Inputs == | ||
=== * (Call) === | === * ([[Impulses|Call]]) === | ||
Call this to write the value. | Call this to write the value. | ||
Line 32: | Line 32: | ||
== Outputs == | == Outputs == | ||
=== OnWritten (Continuation) === | === OnWritten ([[Impulses|Continuation]]) === | ||
sends an impulse after * (Call) has been impulsed and the value pointed to by Variable ([[Type:Variable|Variable]] Sudo-Generic) has been decremented. | sends an impulse after * ([[Impulses|Call]]) has been impulsed and the value pointed to by Variable ([[Type:Variable|Variable]] Sudo-Generic) has been decremented. | ||
=== OnFail (Continuation) === | === OnFail ([[Impulses|Continuation]]) === | ||
sends an impulse after * (Call) has been impulsed and the value wasn't able to be decremented due to a missing target or Variable ([[Type:Variable|Variable]] Sudo-Generic) not pointing to a valid [[Type:IField`1|IField`1]]. | sends an impulse after * ([[Impulses|Call]]) has been impulsed and the value wasn't able to be decremented due to a missing target or Variable ([[Type:Variable|Variable]] Sudo-Generic) not pointing to a valid [[Type:IField`1|IField`1]]. | ||
== Globals == | == Globals == |
Revision as of 00:40, 4 February 2024
Decrements take Variable (Variable Sudo-Generic) as a global, and will decrease the value that Variable (Variable Sudo-Generic) points to by 1.
Decrements are a way to change a specified value without driving it. Instead you can use Decrements to change a value in a similar fashion to changing the value through the inspector. Using Decrements helps with performance too, since the values provided to the node only evaluate for one game tick while the node is being impulsed vs a driver which evaluates every game tick. This can also be used to reduce the amount of times code is evaluated. If you have to search the entire root for your code to find a slot and then do an operation, using Decrements with your operations will help with performance since you're only searching once and not every single game tick.
Inputs
* (Call)
Call this to write the value.
Outputs
OnWritten (Continuation)
sends an impulse after * (Call) has been impulsed and the value pointed to by Variable (Variable Sudo-Generic) has been decremented.
OnFail (Continuation)
sends an impulse after * (Call) has been impulsed and the value wasn't able to be decremented due to a missing target or Variable (Variable Sudo-Generic) not pointing to a valid IField`1.
Globals
Variable (Variable Sudo-Generic)
The numeric Variable to decrement by 1.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.