Play Sensor: Difference between revisions

From Fancade Wiki
(Created page with "Executes the scripts connected to it only on the first tick. Useful for initialization. Output: * On Play: Triggers if the current tick is the first tick. /uploads/Play Sensor.png == Notes == * The Play Sensor is often described as "only executing once", but it actually can execute multiple times, if its "before" wire is connected to another block and it is triggered multiple times during the first tick. * Likewise, if its "before" wire is connected t...")
 
m (Create block template, cut slightly excessive detailing)
 
Line 1: Line 1:
Executes the scripts connected to it only on the first tick. Useful for initialization.
{{Block
|image=Play Sensor.png
|type=s
|folder=Control
|input1={{Port|e|Before}}
|output1={{Port|e|On Play}}
|output2={{Port|e|After}}
}}


Output:
Executes the scripts connected to On Play only on the first tick. Useful for initialization.
* On Play: Triggers if the current tick is the first tick.
 
[[width=336px|/uploads/Play Sensor.png]]


== Notes ==
== Notes ==


* The Play Sensor is often described as "only executing once", but it actually can execute multiple times, if its "before" wire is connected to another block and it is triggered multiple times during the first tick.
* The Play Sensor is often described as "only executing once", but it actually can execute multiple times, if its Before wire is triggered multiple times during the first tick.
* Likewise, if its "before" wire is connected to another block and it _doesn't_ get triggered during the first tick, the Play Sensor will _never_ trigger its "On Play" output.
* Likewise, if its Before wire is connected to another block and it ''does not'' get triggered during the first tick, the Play Sensor will ''never'' trigger its On Play output.
 


[[Category:Blocks]]
[[Category:Blocks]]

Latest revision as of 06:29, 21 May 2024

Play Sensor
Play Sensor.png
TypeScript block
ColliderNone
FolderControl
Ports
Inputs Before
Outputs On Play
After

Executes the scripts connected to On Play only on the first tick. Useful for initialization.

Notes

  • The Play Sensor is often described as "only executing once", but it actually can execute multiple times, if its Before wire is triggered multiple times during the first tick.
  • Likewise, if its Before wire is connected to another block and it does not get triggered during the first tick, the Play Sensor will never trigger its On Play output.