Skip to content

Channels

cloudsbelow edited this page May 5, 2025 · 10 revisions

Channels store integer data on string keys - they're a lot like flags and counters. It is recommended to use channel names without white space or special characters other than underscores such as 1_fish or x (for the regex enjoyers, they should match /\w+/). Channels are very performant and do not busily poll.

Access modifiers:

Sometimes you might want to invert the value of a channel for a certain entity (or some similarly simple operation) without the use of a Math Controller. Access modifiers can accomplish this! Simply decorate a channel with some operations in brackets. For example, if we have channel x, we can make another channel x[+1,%3,==2] which will be tied to the value (x+1)%3==2. In addition to the basic arithmetic operations (+, -, *, /, %, ==, >, <, >=, <=, !) and bitwise operations (~, ^, &, |, <<, >>), we also support max and min which work as expected and x/, x>>, x<< which perform the corresponding operations with orders reversed (so ch[x/3] has value 3/ch). Finally, we support 'safe modulo' %s which is in the positive interval even for negative inputs. Note that for entities that set channels, modifiers have no effect. A channel switch on channel x[+1] will directly change the value of x.

Channel Player Trigger

Modifies a specified channel when the player does a certain action inside the trigger. These actions include entering and leaving the zone, dashing and jumping. You can choose the operation to perform on the player action (such as addition, xor, etc)

Channel Clear Controller

Clear certain channels with a certain prefix when constructed and can also set the value of a single channel.

Channel Math Controller

Can be used to run short scripts on channels. More information can be found at the compiler

Channelmover / Template Channelmover

Move between two node positions based on the least significant bit of the channel (original position of channel is even, node position if odd). Immediately changes direction when channel changes. Non-template channelmovers are obsolete.

  • Move time: the duration in seconds of the movement
  • Asym: the relative (asymmetric) speed of the movement of the outgoing block to the returning one

Channelblock / Template Cassette Block

Appear based on the provided channel. Channelblocks are obsolete. See Template Cassette section for more information.

Channel Booster

Booster that can be missing/normal/reverse based on a channel. Self-activating will change the channel every time you boost from it.

Clone this wiki locally