Description
Magic 8 Ball that can be triggered from commands or Twitch Channel Rewards. Any trigger that allows for input of the question being asked.
Video
Import Code
magic-8-ball.sb (1.6 KB)
Resources
Magic 8 Ball-v1.1.zip (2.8 KB)
Installation
In Streamer.bot click the Import
button in the top menu. Drag the .sb file above into the Import String
field.
-
Extract the zip’s contents into a folder (usually a folder containing your streaming assets).
-
In OBS add a browser source, name it “Magic 8 Ball”
a. Tick"Local file"
& navigate to the index.html file in the new “Magic 8 Ball” folder.
b. Set size to be1920 x 1080
c. Tick both “Shutdown source when not visible” & “Refresh browser when scene becomes active” -
Enable the !8ball command in Streamer.bot Commands tab and/or assign/create the Twitch Channel Reward for the trigger
-
If it is not running, start the websocket server and and tick “Auto Start”.
Configuration
Action 1: Magic 8 Ball
Set the Scene and Source fields to point to the “Magic 8 Ball” source you just created for both of the Set Source Visibility sub-actions (Visible/Hidden sub-actions)
Action 2: Magic 8 Ball Result
Change the text of the chat message as you like.
If you are using Speaker.bot and want the answer spoken via TTS, enable the UDP Broadcast, double-click to edit and change the Voice
field to match the one you want to use from your system.
Change the Ball’s Answer Possibilities
In the Magic 8 Ball
folder you created is a file called script.js
. Open this file in any text editor to edit and change the possible answers.
Keep in mind:
-
Answers need to be kept short to fit in the space
-
Answers will need to be styled each line to fit in a triangle
-
Each answer alternates the direction of the triangle, odd numbered answers have the triangle pointing up and even number answers have the triangle pointing down. Example:
The
First one
Starts short
On top & longer
On the bottom line
.
The 2nd one would
Be longer on the
Top, then get
Smaller on
Bottom
Contributors
Lyfesaver74 & Whipstickgostop
This extension was developed from a Codepen that has been reused so much we are unable to determine the original, true author.