Skip to main content

2. Setting Up Rules

What to do in this step: Check the imported Throw rule, enable it, and use Test Run to confirm the reaction works.

Prerequisites​

  • The scene with Throw installed in step 1

Steps​

  1. Click MARS Hub in the left asset list.

  2. Expand Throw under Execution Rules. The rule looks like this:

    Throw rule in the Hub

    FieldValueMeaning
    Event TypeChatOnly checks when the event is a chat message.
    Message ConditionExact MatchThe full message must match the string below exactly.
    Match String / Regex!ThrowOnly !Throw triggers the reaction. !throw or !Throw please will not.
    Reactions in This RuleThrow and CollapseThe reaction to run when the condition is met.
  3. Click Test Run at the top of the rule. This skips conditions and runs the reaction directly. If a cat flies out and the character ragdolls, it's working.

  4. Set Active to Yes. MARS will now check the condition whenever a real chat event arrives.

  5. Save the scene.

Test Run vs. Active

Active controls whether the rule is checked automatically when events arrive. It can be off and Test Run still works. Imported rules always come in disabled so you can review them before enabling.

Trying different conditions​

  • To change the trigger word, edit Match String / Regex to something like !throw.
  • To allow multiple commands, switch Message Condition to Regex and enter ^!(Throw|던지기)$.
  • To trigger on a 1,000 KRW donation, click + under Event Condition to add another condition, set Event Type to Donation, Donation Amount Condition to Exact Match, and Threshold Amount to 1000. When a rule has multiple conditions, any one match fires the reaction.

For more details on conditions, see the Conditions guide.

Verification​

  • Test Run makes a cat fly out and the character ragdoll.
  • The recent notification in MARS Execution Status at the top of the Hub says Test-ran the 'Throw' rule.
  • After the reaction finishes, Running returns to 0. If it stays at 1, see the FAQ.

Next step: 3. Connecting Platform API Nodes