[0:00] [Music] [0:02] okay today what are we doing okay so [0:05] here's the channel Point redeem we're [0:06] going to make together [0:09] today the red how the redeem is going to [0:11] work it's it's going to pause your main [0:14] your main scene and then put the bottom [0:16] text under it so you're going to [0:18] recreate the cyberpunk meme and we're [0:19] going to learn how to pull in twitch [0:23] messages so your chat can write anything [0:26] in the text you what you will need [0:29] you're going to need need Sammy which is [0:31] uh this program right here we'll talk [0:33] more about it later but this helps me [0:35] create all the redeems that I have on my [0:37] on my stream uh you're going to need the [0:40] OBS freeze plugin and the OBS Source [0:42] clone plugin and if you don't have those [0:45] you can check the cabus that is pinned [0:48] in the chat or if you're watching on [0:50] YouTube it will be all the links will be [0:51] in the description one point that I do [0:54] need to make clear is this will only [0:56] work with OBS this will not work with [1:00] streamlab OBS this will not work with [1:01] like a flavor of OBS yeah and you know [1:05] what I'm saying it if your software [1:08] looks like Turbo Tax from like [1:12] 1993 you know if it looks like this you [1:15] know it's going to be good the first [1:17] lesson software that looks really gray [1:20] is really good okay I'm going to go over [1:22] this very quickly connecting OBS with [1:24] Sammy this is kind of technically the [1:26] hardest part in my opinion it's a little [1:27] confusing at first so Sammy uh talks to [1:30] OBS through something called websockets [1:32] um I'm not going to get into the [1:33] technical details cuz I don't really [1:35] understand it but this is basically the [1:36] way to set that up uh I'll do an example [1:39] here you want to go to your tools bar [1:41] websocket server settings click it you [1:44] will get a window that looks like this [1:47] Okay click show connect info and you'll [1:51] going get a window that looks like this [1:52] okay I need to move my head because I'm [1:53] in the way but this window is going to [1:56] show some sensitive information you're [1:58] going to copy that [2:00] into [2:02] Sammy so you're going to click OBS [2:04] connections down [2:07] here um use the use this IP or the one [2:10] that OBS gives you and then copy the [2:11] password in here and then click connect [2:14] so I disconnected I'm going to click [2:18] connect we good and then the second [2:21] thing you're going to do is uh connect [2:24] your Twitch so uh there should be a [2:26] button here that lets you like add a [2:28] Twitch account this one's way easier [2:29] here you just click it and then like a [2:31] website shows up you say approve [2:33] everything and you're good you want all [2:36] the first three Green Dots activated you [2:40] primarily want the first three green [2:42] we'll talk about bridge in the future [2:44] but you want the first three to be green [2:46] the first one means that you're [2:47] connected to OBS the second one means [2:49] you're con the second and third one [2:51] means you're connected to Twitch events [2:53] I want to talk about a little bit about [2:54] how you should just conceptually think [2:56] about all of this on Twitch you got like [2:58] a million chat messages happening at the [3:00] same time you got a million like let's [3:02] say Subs people subbing to you you're [3:05] balling out on bits I'm sure all of you [3:07] have had some idea before of like hey [3:10] what if every time someone subbed turn [3:12] the screen to a different scene or [3:14] anytime someone uses bits a little guy [3:16] shows up and does a little dance right [3:17] well how Sam Sammy ah so well blah blah [3:21] blah blah so how Sammy helps with all [3:24] this it helps read all these events from [3:25] twitch and then Sammy talks to OBS right [3:29] so so this is the twitch World Sammy [3:31] listens to everything that's happening [3:33] on your Twitch Channel use Sammy to [3:35] activate different things in OBS um the [3:37] way Samy's organized is this Paradigm of [3:40] decks and buttons you create a new deck [3:42] and in that deck you can fill it with [3:44] buttons and you can actually like resize [3:46] the deck to be as like as many buttons [3:48] as you want so here's a 25x 25 grid I'm [3:50] not going to do that I'm going to keep [3:51] it the 10x 10 right and so here's the [3:54] deck and you can have multiple decks [3:56] right I have so many decks I got binders [3:58] full of decks [4:00] and so this is the deck that I actually [4:01] have for today's stream um it has all [4:04] the stuff that I need to control like [4:06] all the different interactive effects I [4:07] can like automatically turn on redeems [4:10] with a push of a button like I just turn [4:11] on the airplane redeem so you guys can [4:13] turn on airplane can throw airplanes at [4:15] me you know you don't need as many decks [4:16] as I do for me I can do a bunch of [4:18] different concepts and each of them has [4:20] their own redeems and then I can go into [4:22] Sammy and like turn on like I can turn [4:25] on and turn off different decks [4:27] depending on what stream I'm doing so [4:29] we're going to learn how to make a [4:31] button today let me uh let me show you [4:33] an example here actually in each deck [4:35] you can make a button and so I already [4:37] made a button for the redeem we're going [4:38] to make today um we're not going to [4:40] worry too much about the code just yet I [4:42] want to pay I want to draw your [4:43] attention to these buttons down here [4:45] which is save run okay cancel mainly the [4:47] run I wanted to draw your attention to [4:49] the Run button down here but this is a [4:50] great way to test your button as you're [4:52] making it if I click the Run button with [4:54] this OB you know with my OBS instance in [4:56] the background [4:58] [Music] [5:00] so this will become important you're [5:02] you're going to press this button a lot [5:04] because you're going to want to test [5:07] your buttons as you make them as a [5:08] streamer you have unlimited Channel [5:10] points so you can also do that and you [5:12] do want to be testing with your channel [5:13] points as well so you're testing end to [5:15] end uh we're going to uh today we're [5:18] just going to make one button to get you [5:20] started but in doing this we're going to [5:22] learn a lot about the different uh [5:24] commands in Samy okay so to make a [5:27] button I double click on the Square here [5:30] double click again to go in and actually [5:32] before we uh get working I'm going to [5:34] right click click edit appearance and [5:37] you know we can change the color of the [5:39] button I'm going to make it Pink I'm [5:40] just going to call it cyberpunk you can [5:42] label it highly recommend labeling your [5:45] buttons you can add an image if you want [5:47] but uh I'm insane I don't add anything [5:49] other than the text and the color [5:50] actually I don't change the color I just [5:51] have text but you can um you can [5:53] customize your buttons it's very helpful [5:55] especially when you're looking on a [5:56] second screen to figure out what's going [5:57] on we've made our button let's double [5:59] click click and enter I want to add I'm [6:01] going to start adding commands to this [6:02] button so basically what this means is [6:05] when this button is activated it's it's [6:07] going to run through a series of [6:08] commands the number one feature that [6:10] every other app needs to copy from this [6:13] is the search function like look at this [6:16] I'm like hey I want to find the switch [6:18] scene [6:19] function boom I type switch switch scene [6:23] or scene switch like on everything else [6:26] I have to like look down a really long [6:28] like drop down menu and sure it's [6:29] organized it has groups but this is so [6:32] fast I have way too many scenes I have a [6:34] problem I'm working on it and each of [6:36] those scenes has like a million sources [6:38] Sammy does enable me to have this many [6:41] scenes because I can just search for [6:43] them okay so let's start over so I want [6:45] to find my scene switch command I type [6:47] that in the search bar click [6:50] that um and then I want to add my I want [6:54] to switch to the scene that pauses [6:56] everything oh let me copy this here [7:00] I want to switch to a different scene [7:02] every time someone uses this redeem that [7:04] pauses this scene okay so I'm going to [7:06] make a new [7:07] scene it's all called cyberpunk Meme and [7:11] every time someone uses the redeem it's [7:13] going to switch to this scene okay it's [7:15] blank right now but we're going to fill [7:16] it up with something all right so I'm [7:18] going to say cyberpunk Meme and if I [7:21] click run it should just switch [7:23] automatically Boom the magic of Sammy so [7:26] I can I can control you know that that's [7:28] already super powerful you put like a [7:30] giant squirrel or a scary skeleton on [7:33] the screen and and scarier viewers okay [7:35] so let's go back to the main scene here [7:37] and I want to set up this cyberpunk meme [7:41] scene to have um to to copy my original [7:45] scene and pause it so how I'm going to [7:48] do that is I'm going to add um a source [7:51] clone which is one of the plugins you [7:53] need to download and this helps you [7:55] mirror different [7:57] sources um in your obs so I'm going to [8:00] mirror the main scene you can mirror a [8:01] scene or a source um I don't know why I [8:04] have to click active clone if you don't [8:05] see anything like double click active [8:07] clone and turn off audio otherwise your [8:09] audio is going to be mirrored and it's [8:11] going to be crazy but if I switch [8:13] between these two scenes they're exactly [8:14] the same right let's build out the scene [8:17] a bit more so I'm going to add a color [8:19] Source this is just like a a slab of [8:22] color make it black put it behind this [8:25] and then I'm going to minimize this [8:27] scene right here yeah so it's starting [8:29] to look like the Cyber Punk Meme and [8:31] then I'm going to add a text [8:34] file okay so I'm going to say call it [8:36] the meme [8:41] text where am I [8:43] going right let's do Times New Roman [8:46] classic font and [8:48] then test text and then I'm also going [8:50] to do um custom text [8:55] extense because this helps like box the [8:57] text in uh I forgot my settings for this [9:00] I think this is it okay you can test it [9:03] but I think that's it but I think that's [9:07] it two uh and the font size I'll make [9:10] like 200 the font size 200 text extend [9:14] 1500 by 500 experiment with [9:18] it okay there we go yeah that looks [9:20] pretty good um I'm going to rename this [9:23] idiot streamer and then also uh make [9:26] that a center alignment [9:29] boom okay so we got we basically got our [9:32] scene right so let's test it as is right [9:34] now so every time this button [9:37] activates it should switch to this [9:40] success okay so it's switching scenes [9:43] every time we are clicking uh every time [9:46] the button activates right but we needed [9:48] to do a few more things we also we [9:50] needed to play the sound and we needed [9:51] to pause the video all right on the [9:53] source clone I'm going to right click go [9:54] to [9:55] filters I'm going to add freeze filter [9:59] this should be one of the plugins you [10:00] also downloaded and installed so freeze [10:04] and it's just Frozen right it's frozen [10:06] on the last frame that you activated the [10:08] filter on I turn off [10:10] freeze right the guy the video keeps [10:12] play or the the scene keeps playing okay [10:14] so uh also fun fun little effect not [10:17] relevant to us today but if you update [10:19] the refresh interval to like something [10:21] higher it like emulates like a low FPS [10:24] effect so like if you make it at least [10:25] 100 [10:26] milliseconds you can get like a low FPS [10:32] emulation you could also make like a [10:34] redeem that like just slows the FPS of [10:35] your stream anyway we're just going to [10:37] put it at zero because we want it [10:38] completely Frozen and I'm going to turn [10:40] it off so what I want to happen we're [10:42] going to go back to Sammy and add some [10:44] more code I want to add something called [10:46] filter change visibility okay you're [10:48] going to be familiar with all these [10:49] commands once you do it enough I believe [10:52] in you this basically lets you turn on [10:54] and off filters um I'm going to go to [10:57] Source name [11:00] I'm going to select uh I think our [11:02] mirror scene was called Source clone 2 [11:04] filter name freeze and activate it okay [11:09] now when I activate this button and it [11:12] switches to that scene it will it will [11:14] freeze the scene at the last [11:20] frame boom [11:22] see and then if we go back everything's [11:26] normal and if we freeze it [11:30] go back everything's normal right so [11:32] we're like 60% of the way [11:35] there okay now we just want to automate [11:38] it we want to freeze it right but then [11:42] we want it to go back kind of [11:43] automatically so we don't have to uh [11:45] touch OBS so I'm going to copy um I'm [11:48] going to click this copy button [11:51] here in Sammy So this this this means [11:54] copy and then this paste button paste [11:56] the same command and have it switch back [11:59] to the main scene when we're [12:01] done next I'm going to add a delay which [12:04] means like wait until this time before [12:07] switching back to the before running [12:09] this command so I know the time that I [12:11] want I'm going to call it two 211 um and [12:13] that's the length of the sound that I [12:15] have pre-plan but um you you would [12:17] experiment with that if you're doing [12:18] this in real life uh what we're going to [12:20] do is we're just going to run this and [12:22] see if it switches back to the the same [12:25] scene [12:27] BO 2 seconds there [12:29] and [12:30] then wait a second hold on something's [12:34] not right it's [12:37] not it's actually not saving the last [12:40] frame it's like stuck on the same frame [12:44] from the first time that we did it so we [12:46] need to add uh another command here that [12:50] turns off the freeze filter when we [12:52] switch [12:53] back otherwise it's going to be the same [12:55] frame [12:56] forever so let's uh yeah so I cloned the [13:00] filter change visibility turn off the [13:03] freeze filter at the same time we switch [13:06] back [13:07] okay and then right here we're do it [13:10] again we're going to run it [13:15] again go [13:18] back boom now it's consistent I'm saving [13:22] the sound to the end because if you [13:24] heard guys if if I had the sound playing [13:27] each time you would just hear the this [13:31] [Music] [13:36] constantly okay so we're we're going to [13:38] save that till the end otherwise when [13:39] you're testing it because this is what [13:41] happened to me I'm testing it and then [13:43] it's [13:45] [Music] [13:47] just con constantly okay it's it's not [13:51] it's not a good time it's not a good [13:53] time I'll save save the sound effects [13:54] for the end okay so uh we're we're going [13:58] to do something fun we're going to do [13:59] the fun part now which is we want to [14:01] change this text we're going to change [14:03] this text to whatever chat puts into the [14:05] redeem right chat can now control this [14:07] text I'm going to make a channel Point [14:09] reward and here's a here's a pro tip I [14:11] want to make the cost like a lot because [14:15] uh I definitely have created Channel [14:17] points in the past at one and then like [14:20] people in offline chat started spamming [14:21] it and ruining my testing so make it [14:24] really high because as a streamer you [14:25] have unlimited Channel points like I can [14:27] use this and you guys can check require [14:29] viewer to enter text so people can enter [14:31] text into um the channel point this is [14:34] the magic okay right click the button [14:36] edit [14:37] triggers and go to Twitch Channel Point [14:41] Redemption uh I clicked this button a [14:43] ton load from Twitch API uh and then [14:46] look up in your search bar goated search [14:50] bar look up cyberpunk [14:55] meme right so that's the redeem I just [14:57] made and then and check user require uh [15:01] user input required uh before I click [15:03] save I want to show you other parts of [15:04] Sammy too which are really cool uh look [15:07] at you can trigger buttons based on any [15:10] of these events here so you can trigger [15:11] it off a hotkey so it's like yeah you [15:13] just press numpad one and your button [15:15] will trigger uh you can repeat it after [15:17] a certain amount of time this basically [15:19] like just repeats your button every X [15:21] seconds look at all these twitch [15:23] commands you can do you can trigger a [15:25] redeem based on ad breaks or someone [15:28] using bits you can do it every time [15:30] someone raids you you can do it every [15:31] time you get a shout out this looks new [15:33] this there's a lot of funny potential [15:35] here like I I want I only trigger [15:37] redeems for five gifted Subs you know [15:39] what I'm saying you can do that here [15:42] anyway that's just a tour of how [15:43] powerful Sammy can be okay so I I [15:46] changed it to this redeem hey I could [15:47] also trigger it on another redeem if I [15:49] wanted to two redeems trigger the same [15:52] thing it's 2024 we can do whatever we [15:54] want I'm going to keep it to [15:56] one okay [16:00] so here's the here's a very important um [16:04] aspect of Sammy that you can take [16:05] advantage of so I'm going to use a [16:07] command called pull or trigger pull [16:11] data [16:12] and this lets me pull [16:15] information from who triggered the [16:18] button from twitch so let me show you [16:22] click this drop down click Channel Point [16:25] Redemption whoa look at all this [16:27] information I can get from the person [16:28] who who you who triggered the redeem I [16:31] want to grab their username and I want [16:34] to save that username and say like [16:37] cyberpunk [16:41] username right and change delay to zero [16:44] because that's I want it to happen [16:46] first copy this go [16:50] back and now select um where is it the [16:53] message I want the message associated [16:56] with the channel Point redeem the [16:57] message that the person typed in I'm [16:58] going to call it the cyberpunk message [17:01] okay I can save these as variables that [17:03] I can use later in the button that's [17:06] crazy all right that is crazy that is [17:08] awesome that you can do this now that I [17:11] want now if I want to edit this text I [17:13] actually don't want the username I [17:14] realize I don't need the username so I'm [17:16] just going to click this trash can [17:17] button to delete it um I just want the [17:19] message I'm going to find the command [17:23] change text look up the source name for [17:26] the text [17:31] uh okay so it's in here meme text so [17:35] that get my source name here and then to [17:38] add the make sure the delays it's make [17:40] sure your delays are as you want them [17:43] otherwise they're going everything's [17:44] going to be out of sync now that I got [17:46] the message from the channel Point [17:48] redeem and saved it into this variable [17:51] how do I use this variable to change the [17:53] text well in Sammy you can reference [17:55] variables that you save by using this/ [17:57] dollar sign command you can see it [17:59] already filled it in and [18:02] then you know programmers may be [18:04] familiar with this type of uh this type [18:06] of work but this basically says whatever [18:09] someone typed into the channelo redeem [18:12] save it as the cyberpunk message and if [18:15] I want to reuse the cyberpunk message [18:17] that I just saved I'm going to put it [18:19] between these dollar signs and slashes [18:21] and to test this let me see if this work [18:23] let's just test it you know let's just [18:25] test it to test this I can't run it [18:27] because if I run it look what happen s [18:29] if I go back to the main scene if I run [18:30] it just as it [18:33] is it's undefined right why does it say [18:37] undefined that's because this is pulling [18:40] in this is trying to pull in a channel [18:42] Point [18:44] redeem uh it's who whoa whoa hold [18:46] on should be right [18:49] here this should be right here so this [18:51] got mixed up that's that's a problem [18:53] first this should come after this yeah [18:55] that that was a [18:56] problem but let's test [18:59] again so it should be in this order I [19:01] had the ordering messed up you want to [19:04] get the message first and then change [19:05] the text but then if I test it with the [19:09] right [19:11] order it's still undefined okay if I [19:15] test it it's [19:16] undefined why is it undefined because [19:19] it's grabbing a channel Point redeem and [19:22] saving the message but I'm not [19:24] activating it with the channel Point [19:25] redeem I'm not activating with the [19:26] channel Point redeem I'm activating it [19:28] as normal there's no user and there's no [19:30] message so I have to open my chat and [19:32] then use my test redeem to test it right [19:35] cuz now it's actually going to fill in [19:37] the message information big [19:40] test boom it's [19:48] working yep that's perfect and so the [19:51] last thing I need is um my sound file [19:54] I'm just going to copy it here [19:59] uh let me go through this really uh [20:00] slowly with you guys so um what you want [20:03] to do is you want to add a play sound [20:06] file we playing sound effect command and [20:10] then look up where your sound file is [20:13] Sammy only takes [20:15] og. OG files so make sure you convert [20:17] all your sound files to OG there's a [20:20] website that I use to just do that [20:22] constantly I can link it in the [20:23] description of the YouTube video if [20:25] you're watching okay so I'm going to [20:27] close that okay so now that sound sound [20:29] effects are in I know the timing of the [20:31] sound effect is about 2 seconds and [20:33] that's what I you know I was testing it [20:34] before the stream okay so alt together [20:37] this is what my code looks like I'm [20:38] going to walk through it really quick [20:40] anytime someone uses a redeem take their [20:42] message save it as a variable called [20:45] cyberpunk message upgrade the text to [20:49] the message that the person used in the [20:50] redeem Play the funny cyberpunk [20:54] sound switch the scene freeze my my [20:58] previous scene that was just on so it [21:00] looks like uh jpeg Meme and then after 2 [21:03] seconds switch back all right maybe it [21:05] makes more sense if I just do it live so [21:07] let's pull our redeems back up [21:11] here haha [21:15] funny oh hold [21:18] on because I didn't save the button I [21:20] didn't save all the didn't save all [21:23] this remember to save your buttons if if [21:25] if it doesn't work exactly as you think [21:28] save the button [21:31] cyber [21:34] Punk perfect that's it that's it all the [21:39] way through I like doing this live [21:41] because I don't have to prepare anything [21:42] I just do it live but I think it's [21:44] important to like have the little [21:46] digressions cuz like you can really see [21:49] everything that Sammy does let's take it [21:51] one step [21:52] further okay cuz you saw us do it with [21:57] Channel points so what if it activated [22:00] for every twitch chat message save [22:04] [Music] [22:13] that okay so I'm glad I actually did [22:15] that uh CU I originally did that as a [22:17] joke but it actually reminded me for one [22:18] last important [22:20] thing oh God this this reminded me to uh [22:24] highlight one important thing which is [22:25] queuing you can CU you want to activate [22:28] cues for certain buttons they won't play [22:31] all at once right sometimes buttons skip [22:33] or whatever like it gets weird if [22:35] there's a lot of commands happening at [22:36] once so I activate I right click this [22:39] button click uh edit settings I click [22:42] allow [22:43] q and then you can even group all your [22:45] buttons together to the same queue so [22:47] say you have a channel your cyberpunk [22:49] redeem you have another funny redeem you [22:51] have a a scene switching redeem but you [22:52] all want them to go one after another [22:54] then you give them all the same group ID [22:56] so I'm going to call this group ID Maybe [22:58] me something like [23:00] that and now okay just to show you the [23:05] the the most insane example like spam [23:07] the chat right [23:09] [Music] [23:13] now see now it's now it's all queued [23:18] [Music] [23:20] up see now it's all queued up it's all [23:23] going to go through all of these buttons [23:24] now uh you can activate the queue by [23:27] clicking active you can activate the [23:29] queue by clicking active buttons you can [23:31] see the entire queue I'm going to click [23:33] interrupt buttons all and I'm going to [23:35] clear it I'm going to clear it okay so [23:37] that got my point across that got my [23:38] point across what if every time this [23:41] redeemed happened it muted the [23:42] streamer's mic so you could cut off the [23:44] streamer right so um there's a command [23:48] to do that in OBS as well anything you [23:50] can like click in OBS you can do in [23:53] Sammy so I'm going to search up Source [23:56] mute [23:58] and look up my [24:01] microphone and this is kind of crazy [24:02] because I can actually mute my mic this [24:04] is kind of wild because I'm muting my [24:06] mic and one instance of OBS and another [24:08] instance of OBS is playing that's kind [24:10] of neat [24:12] um so I'm going to add these commands [24:18] here okay so this is actually going to [24:21] mute my mic when the button starts and [24:24] then after the button ends it's going to [24:27] unmute my mic right so now you'll be [24:29] able to cut me off from talking every [24:31] time the redeem [24:33] happens um and actually here's a little [24:36] tip a little Advanced tip I'm going to [24:38] add a wait for timeout at the [24:41] end I going to wait for like let's say [24:44] 300 milliseconds so you can hear like [24:47] there'll be a small pause in between [24:49] each button so you can hear me like [24:51] desperately try to talk to you I'm going [24:53] to make it 500 milliseconds for YouTube [24:55] this is the whole the whole code at the [24:57] end [24:59] I'm going to set it back to every chat [25:00] message and now it's going to mute my [25:02] mic every time you use the redeem [25:06] I'm so I'm [25:09] talking but you [25:11] can it's cutting [25:14] me constantly okay so you can see this [25:17] can get really chaotic and fun really [25:19] fast if you just think about Sammy as a [25:22] way like anything you can click in [25:25] OBS like just think about this anything [25:27] you can click [25:29] in OBS like mute mute your audio sources [25:33] move things around you can do in Sammy [25:35] you can do it in a programmatic way and [25:37] that's what makes it really powerful so [25:39] that's it guys we made it to the end [25:44] thanks for making it to the end of the [25:45] video we do a lot of interactive stream [25:47] Concepts on my twitch and if this video [25:49] helped your stream give the video a like [25:50] And subscribe to the channel for more