Tutorials:Messages

This technique only works in StepMania 4 and higher (possibly in 3.95), so if you're working with StepMania 3.9, this tutorial isn't for you.

Introduction to MESSAGEMAN
MESSAGEMAN, or the Message Manager, controls the broadcasting of messages. In fact, the only Lua binding MESSAGEMAN has is.

takes in at least one parameter, which is the message name.

An example of using  for a simple message is.

However, sometimes you may want to send extra data along with the message. The second parameter is a table that holds this information.

Catching Messages
Now that you know how to broadcast messages, you can learn to have theme elements handle them. To handle the message, you must create a  where   is the message's name.

Here is an example using the above  message:

Handling Messages
StepMania broadcasts a lot of messages, which are likely to include something you're looking for.

MusicWheelItem
When making custom wheel items, it usually involves handling SetMessage: