LiveStream Chat Scraper and Task Manager in Godot!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Music] [Music] [Music] [Music] all right what's going on everybody it is good to be back i just finished an exam which i did satisfactorily on and that's all that matters uh so tomorrow i'm doing a good old q a for the gogudo jam pretty excited about that but before i do that i really want to get this system working so let me show you a little bit about how this works so if i show it on obs and then oopsies then i run this um why is that not working huh that's weird okay never mind super weird because i haven't done anything ah that's fine [Music] because we should be setting this should happen right so should be transparent that's why is that not transparent that's bad it's a bad start it's a very bad start some might say because that was working when i left it so i i don't really understand why that wouldn't work now if we're literally just running the scene why is it because the world environment now maybe why do i have this here i don't know let's delete it okay what about now okay so that was it so i can't use world environment notes that's fine i think it's just i was like for some glow effect but i can figure that out with a shader if i really am so inclined um okay so a few things that i wanted to do the main one being i want to get the chat xp i also don't know if this is currently working and i need to be streaming to test it so that's good so essentially there's two things that i want to do one is this which is the chat manager so i'll go ahead and show you what this does right now and so the point of this right but something was broken on some script ah the point of this is so that when people chat in their chats will pop up here and then they'll be able to get experience and level up and then yeah so you'll see that so that's cool um and i'll be getting to that in a second but i really need to make sure that this thing is working so this is a task manager and i have it set up so that when i click the start stop toggle button it should contact the youtube api and then we should be able to do this and get the actual start time let's go ahead and print start time and then let's run this oh it's making me interesting it's gonna make me sign in again you can't see it but it's had me do you know the typical sign into google do you allow them to use these permissions okay then it just received the json there cool no active stream on channel well that's just objectively false i think everyone watching this can attest to that of which there is no one right now but that's fine unless this is inaccurate but i don't think it is yep no one's watching that's cool um but whatever okay so what exactly the waiting for livestream info huh that's weird let's try this okay so it seems like it should be working can anyone hear me let's make sure that's happening actually real quick okay so it seems like it should be working can anyone hear me oh yes you can more than hear me in fact that's pretty loud change that to 27 how's that sound oh yes you can more than hear me in fact that's pretty loud change that to 27 how's that sound okay sorry doing that infinite loop there okey dokey so this that is certainly not how long i've been streaming though right i've been streaming for yes almost 10 minutes so this means that this is incorrect and i don't know why it's also not printing the start time okay let's do this print hi and then we'll say print oauth and then we'll do print uh yt api okay uh and then this should print the start time right there at the end and then we'll do okay okay coco coo let's try one more time here this should be working okay hi make loading screen oauth 2.authorize yield oauth 2 token received okay so it's not currently it's not getting to this so this must not be working let's do print hi using a lot of calls here but uh luckily i have ten thousand very interesting oh no so that did do that so okay so this yield here is never happening so we're yielding for oauth 2 token received let's go to oauth 2 2 oh my dog just literally like slid down my lap onto the floor like a ninja but more like a pug than a ninja i'll be honest okay so we've got the token receive signal and i'm emitting this signal right here so this should work and unless this is just not working here which um i think it is right let's print uh print hi because this has to be running because otherwise we'd be getting this error and we're not what's happening in the debugger here connect returns a value okay that's fine all right what the heck okay so that's actually a good thing because the fact that that means that this is just never getting called so get token from json is never being called um so function authorized so we have to call answers let's not execute interpreter path okay when are we calling this it should god damn it i'm thinking real hard about getting like a servo motor and an arduino and just making a door that opens when my dog like hits the side of the door there because she does it just like constantly in and out in now it's so annoying um i mean obviously pretty pretty cute but uh yeah okay so what is calling this function i'm gonna just do this search finding files authorize and it'll go like that okay fine so task manager so i'm calling the function right here one button press oauth2.authorize okay so that means so this is being called or error equals os the execute credentials dot pi okay oh it's not going to show me those but the okay get credentials upon global door path get credentials dot pi maybe this is moved because maybe this isn't working let's do print authorizing all right okay so that again is partially good news because essentially what that to me means but it's not what also what is when you search scrape why is this running ah okay well that's fine we'll figure that out later this is the main problem so if air equals okay get token from json else push air air executing this with the air but it's not pushing that air so to me so let's print her let's hear let's go print hollow here we go print key doesn't really matter so we should see all of that print so it did all print okay oh i fool kitty doop deed i have to do that it i made it so that it's now i've got all these extra chromes here that's not what i want to do so that it it's like kind of a getaway of i do have two crumbs open okay cool cool cool cool cool cool okay so all these are happening so get token from json is being called right here okay so we know that that must be happening so why was this print um yeah okay so that should print we should whatever okay and we know this is giving me that right so get token from json and so we know that's printing hello where i'm printing the air right here there zero okay so the signal okay so that was printing there token json path so res oauth to token info.json res off to oh you can't that's so annoying okay um i really i don't understand why they would not let you see other files in the file system here um okay godot code live stream games but we do want the project files to token tokeninfo.json there it is okay let's open that up in vs code real quick okay so it's saving a token here probably shouldn't have showed you guys that but uh hey it'll refresh it in 10 seconds anyway um so that's there that's at that path let's do copies path name yeah oauth2tokeninfo.json okay perfect perfect [Music] let's put some more prints i really don't get this was all working so it's this is not even what i wanted to work on uh okay let's try this we're gonna print hi okay that prints high okay let's print air here air zero so this should be working text equals get file as text token equals parse system okay print hello last time please okay so it is emitting the signal it's supposedly token received so then if we go back to not this one but this one onstart stop button toggled oauth2 dot authorized yield oauth 2 token received so why would that not work yo what's up shiva fear yeah i know good oh 3.4 is released i'm probably not going to upgrade for quite a while because i just don't trust that like things are going to break that i don't want to deal with um so i'm just going to stick with the this version probably for a while probably yeah i mean maybe after the stream tomorrow i might switch over but definitely not until then um yeah i guess that's my definition of a while so it's so weird though because so this is clearly not happening make loading screen oauth to token received waiting for oauth 2 yield oauth 2 token received so let me click screen okay so maybe it's the loading screen let's do this see now oh oh that's weird let me do that no that was not it that was not it my friends okay look there's uh there's the chat right there what are you working on uh so this is actually like a little live stream uh widget here for godot i'm i mean for obs and so uh well here i'll show you so i can go ahead and make it visible in obs here if i run this here we go so now you can see that it's uh it's actually up there but i can interact with the app here so what i'll do is make this full screen and then i'll go put this somewhere you guys can't see like over here um and then i can go and interact with this and so i'll be able to officially start the stream well this won't start the stream this will start this will get like when the stream time starts and then i can put like tasks like i don't know like if someone asks a question like how to make smooth camera um and i can do this okay yo what did did i upgrade i think i updated good i must ah yep i think i did update godot because everything's just broken this all worked all of this worked none of it was not working and now like none of it's working it's awful dude i'm kind of freaked out i thought i was gonna like get a lot of stuff done and now it's like nothing is working oh god okay my dog i'm not letting you back in beanie you're done get out get out they both keep just going in and out it's so irritating okay so why on god's green thrudging earth would this button not work man okay there's that button signal pressed connected to vbox container here um wait a second where is this connected to oh it's in there task reader okay emit signal task created task name okay okay and that bounces that up to v box that's how i did that okay that's fine so then we make the task instance oh nevermind i'm dumb i the reason that didn't work is because i need i want to put oh my um there she is she's staying outside though uh my mouse is at like 30 so i might have to use this grandpa little mouse i bought to use my raspberry pi um no no i knew i wasn't in uh 3.4 i thought i i thought i like was at 3.3.3 before and um then updated 3.3.4 recently christ okay fine come in here they're so annoying okay um yeah so the reason is i made it so you have to start the stream before you can add tasks but uh i didn't put any i haven't made any alert system i was just like oh i'll remember that which is dumb i should do that but that's now definitely lower on the priority list but it still makes no absolutely no sense to me why this is not working because we're calling this signal is being emitted like it is right so i really don't understand we're calling the function on oauth2 where is oauth 2. we're calling this function this is working we know that this is calling this function and we know that this signal is being emitted so i really maybe i just have to here let's try this yield get um score tree dot create timer 0.1 uh timeout okay see maybe that was the problem okay so that was the problem that's that's very good news i gotta force quit this now okay so static function get time from broadcast nominal functions function split and base nil say if date time is string ah say else uh return no oh wait what ah i see so we'll just return an empty array if not okay what the is happening dude why is everything breaking this was all working all right let's go this fourth quit that because i don't want that to be doing that yet oh and of course now we're gonna have to go to that chrome there quitter uh-oh i quit the good chrome no good quit the garbage chrome the garbage chrome okay i would really love to figure out what is exactly going on i feel like i'm running around my head cut off right now to be honest because i've been out of the game for so long and also this was just working the last time i was using it so i'm very very confused i don't quite understand where it's breaking i kind of wish i didn't just put that quick patch on that because i didn't even look it i thought i would just fix this real quick and be done emit signal air calling method from signal broadcast id received canvas layer loading screen die method expected zero arguments but called with one uh broadcast id received this is a youtube api script okay so we need loading screen and huh emit signal broadcast id received ah i see okay and then on here why would hit okay we'll just do this i'm gonna i'm again just patching it because i just need to get something um okay i imagine this is still gonna break somewhere along the lines okay but now that's breaking a much more reasonable spot it's just a big problem because every time uh i do this i have to close one of these chromes that wasn't even it no always in the mood there we go that was it nice okay cool cuckoo yeah it's cause you showed up man you're the curse no i i don't know i i'm now i don't even know where i had that other function is it in here let's see that was let's see it's static let's go search find files i don't think i have any other static functions there we go okay so some chat scraping this isn't chat scraping no no it's not static function okay so this is in youtube api and we are calling this function where nowhere right yeah nowhere we're calling it somewhere else so i'm actually gonna leave this like that and let's do this one more time and it'll break again but this time we can see why it's not working okay involved call non-existent function split in base nil so now i want to see where exactly we're calling the at function uh okay oh so this is actually let's go to the output okay cool so that means we made it down now to this and we're calling this function start stop button targled start time get seconds from time youtube api dot get time from broadcast youtube api dot live broadcast resource i get actual start time okay ah i see what hm oh i see that's because this okay so we need to go to the youtube api right here broadcast id so i gotta figure this out broadcast id string okay broadcast id okay there's output okay so it did it did get the broadcast id so that's the problem but it shouldn't be a problem okay live broadcast resource equals data that get items zero okay so let's print live broadcast resource i just run this okay it's gonna make me do all this again which is not great say i feel a little bad about it okay that's that one that's that one that was not the right one that was the one i use yep ah okay oh that's fine oh and that was the wrong one too dude i hate that the web scraper i use uses the same uh actual browser that i use here okay uh let's see can i go to history and just open that right back up yes i can and we back my pava what's going on man uh if you're asking me how life's going it's uh it's just all right med school's not fun i think it's gonna get fun but this first semester their first yeah first semester is just awful man um okay so we wait no we haven't run it this way yet i think we're gonna have to which is kind of a pain because it's gonna break okay so i want to see okay so this is working first of all let's try let's quit this yes okay okay so this is it discord why does it have that is default broadcast live chat id so we've got this so if we go so get time from broadcast date time date time so we're calling that from task manager and then we're saying youtube api dot live broadcast resource dot get actual start time so well yeah i'm so done because i should just stop doing this and start doing uh print youtube api dot live broadcast resource okay so let's do that real quick here let's actually do that because we know that that's no longer the problem okay okay okay can't sleep bro i feel you that i don't i don't think what just came out of my mouth was english but i i feel you i like i like stay up late at night for no reason like i finished everything i have to do but for some reason i like don't want to let myself go to bed um yeah nice dude oh yeah i don't know if i told you guys i joined a research lab like a real research lab and uh we're like we're building robots that can climb telephone poles uh with the hope that they'll be able to change wires and so like there's like a legit engineer in the group who knows way more than me about like actually controlling stuff and it's kind of annoying because he knows more than me but there's some ideas where i need to like he needs to listen to me you know but i don't know all right i figured out how to do computer vision too it's dope it's 4 15. oh you're crazy do you have anything to do tomorrow okay why so why can't no i'm not trying to get the live cat id so we have published at i know why this is not working it is because in the youtube api script when we save live broadcast resource yeah so we let's do this let's print data okay i don't know why i'm printing this okay let's clear the terminal here run that why did it print it twice again oh because this is this is data and this is just items so this is items you know why it's because there's no actual start time ah there it is we need to say get snippet okay so let's not print this because i'm a little confused right now um here let's do uh let's go to i've got chrome let's open another uh chrome new window okay and then we'll say youtube live chat live chat api live live broadcast resource live chat messages that's not what we want we want live broadcasts and overview and then let me go back here oh dude oh how do you do that man how are you gonna wake up in four hours i i got only like just a little under seven hours of sleep last night and i i still feel horrible as they say in new york okay so so this is what i should be returned and so i don't even see where items is on this but we need actual start time which should be right here okay that should be in snippet so i think if we do items so right now i'm printing data is there actual start time in here oh this is all in it okay so what if we say get snippet yeah okay live rock city dot get snippet okay and then let's print that dude why is that happening [Music] why you always in the mood yeah i'm gonna have to restart my computer after this the problem is like when this isn't working i'm gonna have like a bunch of weird nah i don't sleep sleep is for dude it's not like they actually something really interesting um they did this research study and you couldn't survive longer without food than without sleep by a long shot right like if we're specifically rem sleep if you don't get like i think it was like four days of rem sleep you'll start to break down and i think you can die within five days with no rem sleep which is pretty insane it's like it's you literally need sleep more than you need food and i think i think you can last a week without water so you can it will kill you before you know dying of thirst would which is pretty nuts you know what i mean it's a very important thing and you learn when you sleep pretty cool pretty cool learned a lot none of that in med school though um okay so i want to get rid of whatever else is printed because i want to make sure i know where did i put the other print functions in task manager yes that's what i don't want let's go back to the youtube api okay yeah because now i don't know exactly what was printed and from there and what wasn't let's actually also go back to the youtube api here and then we'll say it's not that i want to say let's do prints and then i'll do here and then it is that right okay beautiful okay cool okie dokie here actual start time so this is the actual this is the snippet way i'm confused now what if we do get dot get and then we say actual start time from there i think that's it this is like such a simple thing i'm kind of upset that it's uh throwing me for such a loop oh thank you thank you dude oh my god i don't know if you guys noticed let's see let's make sure obs is being normal but like right down here this is all the chat you can see it's all popping up right there so by the end of the video i'm not going to stop until i get this done i'm going to have the chat um displaying up in this chat manager here like just like how this is gonna oops that's the wrong thing it's like how this is doing that with chats and then they fade away um there you go that is going to happen with your messages in chat i will not stop till i get that done and then basically by chatting you're going to be able to get like experience points um [Music] okay the loading screen i that i took approach i took was definitely very weird typically i make a global thing but this time i decided to make one that you spawn and then it kills it well kills itself what's up yeah but anyway okay so now that we've got that let's go back to the youtube api here so this is the correct way to get the actual start time i don't know if my mic's picking up the crazy sounds my dog my dogs make but it's it's hysterical okay let's go back to the tackle attacks man task manager um and we want to do this all it was missing was that get snippet uh also trying to be fancy and doing it in one line is never a fantastic idea but it's something i do fairly often okay no come on bro inbound operates string and int in operator times hmm let's do print time here um okay okay so yeah so essentially what i'm doing right here is that um we're doing the uh uh oauth2 authorization to get a token then we're contacting the youtube api with that token to get information about the live stream that's going on right now right um hello hello hello oh you're trying to see yeah it'll pop up down there it does pop up in relative real time though i've i've slowed it down a little bit for um just making more efficient but i'm gonna try and figure out how to make it faster again or more responsive okay but anyway yeah so we wait we get the all the information about this stream uh and then what we do is we use that information here and then of course for some reason it's breaking so let's print i don't know i don't even know what i'm really doing here okay because it's going to break if we go to the output it should say here so these a 14z why the is there a z in there okay um so actual start time date time oopsies big time okay so the first thing i'm doing from this is where am i putting this in youtube api get time from broadcast date time return datetime.split t because it should be in this format right i should always just be there okay so split t okay one because we only want this part and then we say dot split plus y why would i do that there shouldn't be a plus get time from broadcast daytime unless did they change that recently did they change the format or something here let's let's oh no wait didn't it no let's just do this print the time making a mess right here but let's just do it okay i'll put date time is 20 21 t okay yeah so it's in so that function is just uh i think that's better i'm always in the mood oh my god don't be that one yes okay okay no concurrent viewers well that's all chill see if i care okay so this is what we're getting which is exactly what that says there why is this a plus why did i do that yeah that's exactly what this says it should look like split plus zero so why is that splitting plus so this first split one is going to get us everything over here why don't i split plus zero hmm oh because it could potentially have a plus in it like here's okay um there we go okay so time zone designator is what obviously we want to get rid of but uh which one are they using it doesn't look like i guess they're doing like z right so get rid of that they are doing this one they are using that one so yeah so this could have a plus ah okay all right all right all right so if we split if we do this what i should really do is just do a little something like so here is an example of a real date time that we received and i would like to convert that that's what i actually did last time i took this example and then i made sure i split this correctly 22 10 and then 14z okay so all we have to do is remove the z right that should be because that's giving us the seconds yeah and then so we'll say um date time equals that then we'll return date time and then here we want to say date time uh should be always the last one right negative one and then so that should yeah she's she's right there little you're amazing yeah please sleep have a great sleep have a as good of a day as you can muster from four hours of sleep i don't know how you do that but uh yeah have a great day man okay so this is grabbing 14z which is now and we just want to do i think it's just remove for f equals h f dot remove erase i think it's a race okay dot erase the erase z okay and let's just see if that fixes all our problems maybe it will expected two arguments okay maybe i just don't understand what the hell is going on here okay let's do this get the spring class here and how where is the erase function or move erase oh position no we want to do is it strip count empty ends with erase fine fine last format hash hex to exit l strip left strip or just left length match it's got i mean and there's one in replace that's what we want we just replace okay let's just do that okay so don't replace and then we're just going to replace the z for an empty one here let's do that it's still there dude is uh okay let's see where did i just open this i think i'm gonna have to close some of these guys because this is a little a little insane don't know what the hell i'm looking at anymore probably should have left many of those open but that's okay okay youtube api so we're replacing oh is negative one yeah negative one's not what we want we want the end of the list so in this case it's three so we want two what the why why okay now i'm starting to think that replace does not do it in place replaces the currency okay okay so it does it does it in place okay sense of suction print okay date time 2. let's just print date 100 better way to do this okay zero one two now let's print date time two 14z okay so finally i i've got to fix this because holy smokes i don't even know which crumbs which right now okay well that's interesting holy birch oh my god i'm losing my mind i pull up chat again well why you always in the mood okay daytime equals daytime. blah blah blah great time too so we know that that is giving us this so and replace should be doing it in place it's not returning it right yeah it's doing it's modifying date time too time to equals that i'd imagine this will give me an error again give me an error wait now it doesn't make sense because now i know for a fact that that should work why am i not converting these things to ins though they're still strings obviously i think i'm going to do that in this function so it should be this should be int time zero just like that let's do that okay oh god it's so annoying there's no way to know which one you're closing because it moves every time you click on it so it's oh i hate it i hate it okay i'm not going to open chat until i solve this because it's just oh okay now we're most of the way there because the program is no longer crashing ladies and gentlemen but bruh but as you can see the time that was displayed there at the top was freaking massively negative so somehow i'm doing the math wrong in the task manager script here so if i go to task manager you don't want to print the time anymore don't have to do that we solve those problems and then if we go back to should be task manager right okay start time get seconds from time youtube api where else am i printing oh there we go nope that's not what i wanted yeah okay we don't need none of that all right oopsies okay look at all that beautiful stuff now where is that being printed from though i don't i still don't totally understand where that is isn't this script nope should be pushing air on those and not printing but whatever um youtube you're under get time for rockers with e to a libraries that gets them to get actual start time so we get the actual start time and we convert it to seconds and that should be done i don't do that in this do i yeah i do get time from seconds get seconds from time then you should definitely be right next to each other okay get seconds from time time we take hours which is int to convert then we add the hours plus minutes plus seconds okay that looks good right there's 3 600 seconds in an hour there's 60 seconds in a minute and obviously seconds or literally seconds you know what i'm super confused about and not liking right now is the fact that this has returned to us 14 oh wait that i'm so dumb yes because that was the actual third time okay so i actually do think that is fine the problem here is how are we using start time and i don't think that's correct um so on sure box container mouse entered your mouse exited where is this happening task completed onset final duration up here where's that happen where's the loop refresh okay yeah where where is this where is on refresh there you are okay seconds elapsed equals get takes milliseconds uh divided by a thousand why am i dividing by a thousand why him hein doing that oh we should just do this in like the race function okay let's do print hmm oh well now i need to look that up okay so get ticks milliseconds returns the amount of time since the engine has started why am i using that that makes no sense we want start time minus that because hmm i see we need to calculate how much time has passed from the start time so we don't want the os get milliseconds what we actually want is the actual time so we want to say like get time beautiful a dictionary of keys hour minute second yeah this is what we want so we want to say literally just get time and also we can say get time milliseconds uh get score time what's unix time is that in seconds the current unix epoch times like no that is not what we want yeah let's just use get time okay get time it's actually hour minute second um okay utc okay so get time so we want to do here is then uh wait where are they doing that okay all right i'm gonna do print os dot get underscore time okay and then uh let's see what that gives us okay okay yeah so it's a dictionary so then we can call we want the hour minute and seconds okay cool cool cool cool now the only problem with that is that that doesn't work with our current function get seconds from time but it's not too hard so this is the format right so so i'm going to make a new function so i'm going to say function get current time sex oh another dumb thing this is this is getting the seconds not the milliseconds and i was using milliseconds before okay anyway but um so we want to say time equals uh os dot get um okay underscore time okay and then what we want to do is we want to say time then equals and we'll say get seconds from time get underscore seconds from time and then we're going to provide this so we're going to say time so we want hours men seconds so we want literally i'm just going to take this okay and then we're going to go like this except hours minute seconds okay and how do we do this so our oh let's do i don't know why i keep trying to find a way out of this it's really not that complicated what hours men seconds okay should be minute should be second okay time equals get seconds from time time hour sorry uh time get seconds from time hour minute second these should be i think those are ins if not we'll figure that out pretty quickly um yeah and so this will give us the we need to return return time okay so rtm equals almost the time time equals that so we're going to get the seconds from that uh and then we're just going to return whatever that is um and so that will be the time in seconds of the current day which i'd still i don't even know if that's the really what we wanted to solve but so this is definitely not working this is since we started the engine which is not what we want right that's totally useless to us this should be times a thousand if anything um and then the start time will be the time of day so if we do seconds elapsed oh wait oh you know why it's because i thought this meant the time that the engine did start not so that's why i made that mistake okay um which is a dumb thing why would they even make that function aaron that can't be what i thought i don't know what i was thinking but i did i definitely thought this was working no you know why it's because before start time was just get out os get get takes milliseconds and i haven't done anything to fix that since we changed that in fact right here we're setting start time equal to that which can't happen anymore we need that not to happen because we want start time to be only set right here okay so the start time again so for instance this might be like 18. it should only be bigger than start time right because you will have to have started before we've done this so we want to do this minus start time that is correct so we want to say get current time seconds okay minus start time that's going to be our seconds elapsed and then i'm also doing that down there okay okay good now let's see what we got going here nope that is not working it's definitely not negative three oh but there's all your chat so that's working the numbers getting smaller it's not the good how could start time be bigger we started well before the current time in milliseconds so let's just prints get current time and then start time let's see what that do because we are not adjusted for daylight savings time but the time is adjusted for daylight savings time oh and that's why uh everything's making sense now but it's i just didn't think about okay so i don't think anyone's even watching me but i'll go ahead and explain yo what's up jayvon yeah everything it's all right medical school sucks i wouldn't do it if i were you but uh you know i'm glad to be back finished an exam today but uh i just made a big breakthrough even though it's just a bunch more work that i have to do but essentially i was confused as to why this function get time from broadcast time was breaking um and it's because this worked before daylight savings time uh was taken into effect but now that daylight savings time is taken to effect we have to account the z here the z and so the z if we did i close google i did god damn it okay oh yes i need to make a new one here there's we should name these let's put this over here okay um let's go history now open five tabs oh that's not the right one there you go history uh i think this is what i was interested in yes this is what i was interested in okay so this is what it's giving us so time zone difference tzd so let's do this damn it okay it started up the other google which is now not even gonna work for me that's great okay so this is what it spat out right so it's not even so it should still be 22 minutes or 22 10 14 but then we need to take into account the time zone difference so i guess i just don't understand exactly like they're not giving us the time zone difference right they're just putting z there so it's like maybe i'm stupid bro i don't uh okay um let's see oh okay bom bom bom no we definitely don't need to be on chat player or chat manager task manager and then so this is printing this will print the current time and the start time here which is fine but that doesn't really matter the problem is this is smaller but we okay this is what i was trying to do get time zone info transcribe the dictionary keys every minute second returns the current time zone as a dictionary with the keys bias and name huh hmm so we need daylight savings time let's go let's dst why would you not put daylight savings time with time and date instead okay so we need we need to get date time and we also need to get daylight savings time so let's come back here and uh let's do print os dot get date time okay and let's just run this one specifically real quick okay uh do to do dst false wait i thought they let sightings on what's happening right now mm-hmm oh it ended november 7th it ended it's so dumb i hate it i hate daylight savings time okay so then i'm confused because there should not be daylight savings time why is actually why is actually their problem all right let's run this okay i want oh i have to stop this because i put that in the wrong place okay yeah so that's exactly 10 000 off right because that's the time we started this is the current time nope that's not so i don't get it dude i hate working with time okay how long has the stream been going on question number one we've been live for an hour and 20 minutes and 10 seconds meaning that we started at 5 10 right yeah so we started at 5 10. so if we start at 5 10 um i don't think that's the start time it's giving us uh let's see what could i print that you know what i think this is also doing that yes okay thank god i hate that so much i don't know why i have it okay i think i might get rid of flux for godot yes but i would like to just oh i can just quit it you know just quick flex there we go all right much better even though it burns my eyes a little bit now i can actually understand and then i can just dim it a little bit there we go same same same difference okay wow that is a whole new ball game boom why you always in the mood going around acting brand new this is what i want to do so this is like kind of like a physics process type function that i made it's doing every 60 seconds now get current time and seconds get start time this is going to be on the youtube api uh when we run this i do want to just print daytime okay gotta wait for a second before i quit this otherwise it's gonna keep chrome open i don't know why if it's in the middle of doing something in my python script it just won't quit it but i have it set up so it quits the script when i quit the application but in real life i'd never have to worry about that because i would always keep it running ah sorry leonardo i just saw your thing there see what you get hey dude a few days ago i finished the non-coders guide and i just want to thank you so much for those videos not only help me understand but to start my adventure the game developer oh thanks man i'd love to hear that that's that's so awesome i really need to do the last one i just keep not having time and feeling like you know i think i think i'm just gonna like pull it together and just get it done on friday it might not be the best thing ever but it just needs to be done so it's like it's not that hard to explain a for loop right okay but anyway but yeah thank you so much i'd love to just complete that i love that i'm like actually able to help people with that stuff okay so this says that the start time was wait oh that's in gtc right 12 or 22 minus 12 is 10. so they're saying that i started at 10 10 assumingly yes it's 22 so 10 10 p.m okay [Music] so this is just a format they're not saying what time that is and then this should tell me if it's in the date and time the broncos actually ended this reveal once the broadcast that is complete what what time is that like what time's up how am i supposed to know that stuff is that in here somewhere else scheduled start time end time actual end time is default cover live chat id url with high thumbnails description title channel id published at id tag um i would like to order food uh just a friendly debate about the normal range of blood osmolarity yeah that happened we were like legitimately arguing like 10 numbers difference about what we thought blood osmolarity should be that's where i've counted me guys you guys like sodium right right everyone likes a little bit of sodium it's a really stupid joke okay um does this even have yeah here's the actual start time but it's not telling why is it not saying publish at date time then add to youtube's live broadcast schedule the schedule the time is specified in blank format but it's not oh my god why is it not saying what time zone that's in it just says z and if we go to the no that's not what i want to do i want to right click that uh-huh [Music] i don't get it i don't get it it's just saying 14 z it's not telling me what i need to add or subtract here which i'm just so confused about okay item so i'm doing this and then or i'm calling that from task manager task manager i'm calling that right here get seconds from time youtube get time from broadcast date time uh youtube api dot product get snippet dot get actual start time so that should be yeah so this is exactly what youtube is giving me right wait what this is this was this is yesterday yo i'm so confused right now time is it giving me it says it was at 10 10 p.m yesterday so is gtc oh the phone okay isn't that called gtc or mine tripping what's it called oh utc right yep utc 11 37 pm oh baby okay okay i understand good sir okay now is there a nope there is no no they give you you can do unions time but you can't get utc time oh wait wait oh my god get date time returns current day time and then we can say utc true and it should fix everything oh my god i'm getting real excited okay get current time get current time seconds and then here we're gonna say true and now let's give it our best shot fire away okay let's open that oh mark it feels good okay so as you can see what has happened here um is that uh if we go up to the stream time and i think this is gonna be no it's not doing it let me show you okay there we go now i don't know if anyone's actually watching yeah i got three people watching all right so um this is the actual window right here as you can see i can move this around but what you see right out here on your screen is actually being projected in obs so i'm going to make this window go away make it go full screen here and i'm going to put it on my other monitor which is how this is meant to be used um and now so you should be able to swoop there we go that's wrong so you should be able to see me or see it but i i currently there's nothing on this screen right there's nothing i see nothing here i see something over here though and i have the stream time this counts the actual stream time so if you go to the youtube we go to youtube and look at how long i've been on this this counts this is so not with us we're not even at the chat scraping part yet but okay so this is how what's the time oh we can go right here 129.43 i mean that's pretty damn good dude i think it's um simply that this has not actually caught up that that's the latency i think that because this we're getting the actual start time of the broadcast so i think that it's just this is the latency between actually recording it and whatnot um yeah i think the latency is like six seconds that's not that's actually really not bad for latency but okay cool that is very very good very very nice yes okay and then i can quit this program because i'm done with it we can also go here and stop printing this okay warning integer division i hate that and then this is just note for myself okay okay okay now somewhere else is printing i think that was in right here yep right here i do really quickly actually want to grab one of these examples hmm and then i'll just add a z here so that way uh people know i'm not crazy okay sometimes literal see and okay just so i understand why i did that because it doesn't really make sense if you look at what they're saying it should not include a literal z in the string but uh anyway i think my girlfriend's about to ask me let's do this me can i add okay all righty then so now that means the task manager is done for what i need it to be done so that's cool um mostly i just realized that in doing this now i've i've made it so that i cannot uh it's like if i run this okay and i start should work beautiful just like that um and now this is great obviously and then i can add something i can say okay now we're going to start on the um chat chat player right and then i'll hit that now that's there and then we can start that at any time okay that's up so i got gotta fix that but the um the point wasn't saying oh yeah i would like to be able to edit this so like for instance i did these in the past right so i would like to be like if i added a task that was in the past i would like to be able to like actually change the start time manually so i can say oh this is about when i started it whatever okay that's fine um so now but this should be quick oh famous last words but dying man okay panel container task rated where i thought we were creating the instance here oh yep you know why because there is a separate task scene and test name start stop then yep that's why because we need to get let's go to task manager get time from sex get sex from time get current time sex i am going to actually do a little bit of reorganizing here that might me because i wanna i'm gonna put these in my global script here because i think they can be handy um okay and then what we have to do is anyways here you get current current time hell yeah she's getting indian food baby we just want to replace that with task manager globals dot get current time sex place all okay two matches and then again we're just gonna do this replace all task manager oh son of the edge okay well we can do this though just fix that because this should be a lowercase l replace all hey all right now oh wait why some bro [Music] get seconds from time that needs to be that so that way it's a function okay uh let's see if nope still getting an error here why are we getting an error oh because this is added twice that is why uh oh i'm just gonna have to undo a bunch please get indian food i love it okay let's try this again so we've got this and i would like to so we've got that there there's two matches i want to go okay let's just do this for these ones at least do this and we say get seconds from time and here we can say task manager globals make sure task manager global just like that okay we shouldn't have to put those there on this one okay let's replace all okay now now we only have to worry about this one okay and we want to again do this then we want to and that should work because we shouldn't be replacing okay there you go get time from sex that's the final one here and same deal all right see if this all works now great nothing is broken okay good the reason i the whole reason i did that is oh i forgot you can't close that early yes it's basically a guessing game closing the correct uh chrome window you really you literally never know okay oh freaking k on task creator task created task name okay and then we want to go to the actual task and then in this instead of doing this i think so yeah here we want to replace that with task manager globals dot get current time sex play song make sure i didn't break anything sec the assigned value doesn't have a set type the variable can't be inferred we don't need to infer it okay and now let's try one more time here duty nope dude okay and now oh that shouldn't usually happen see if we can start this and there you go yeah okay i for some reason i thought i saw this number change but that's good that's good that's working perfectly as expected and now we've got those changed thoughts real quick make sure that chapters is working uh okay so here's this no no that's not this oh we have to stop okay so we have to go here and i'll hit stop um oh yeah we don't need that any longer yeah none of that's gonna work yeah okay well you know what no i definitely want that to work all right good news is we can get rid of all of these ask creator task os and string beautiful um and then we should be able to go to uh buh in here chapter selector yes okay perfecto make sure you want to delete this file blah blah blah confirmation dialogue should be in the script here confirm delete get files in directory load file get time string from seconds okay refresh display okay delete button press file button pressed now where ah this is this is it nope that's the same thing don't say i don't know what i just did when we hit chapters oh is that in this no the chapters button is not in this chapters button okay signal here and then address button get free chapters button pressed chapter select popup.popup okay so we're popping this up oh no i am dumb because no we don't yeah we don't need this we need this one because when we hit stop that's what's happening okay so we'll go right here start stop button toggled uh and then here is where what happens if we press stop code lagomorph is it phillip what time is it in the philippines man i feel like it's late there i mean i honestly have absolutely no concept but um yeah i feel like that's uh over there it's in that far away way place place space space test manager global's set active false time elapsed equals test manager goals that current time seconds minus start time so this is the total time elapsed if youtube pop-up instance pop up okay where am i insisting that okay so we're adding that to the parent connecting that and then we're adding that there okey dokey popup instance dot connect set file duration self onset final duration that is what we're looking for folks okay here's where something is getting smashed up oh wait no no no no no no no no no no no no that's that's not true this should be fine actually get seconds from time final duration minus seconds elapsed why would you shouldn't that be zero no yes because in the past i needed to calculate that but now everything's going to be accurate so we actually don't need to calculate anything okay so we don't need to yeah we don't need to do any of this right because we don't need an offset because save data title chapters chapter in chapters on task completed chapters that append formatted task format task name okay so yeah so we don't need to change their start time or anything like that because the start time will be correctly set so that's all we need to do there and we don't need final duration okay hence we need okay so that's being called by the pop-up instance finished pop-up scene okay it's that final duration oh what's what's breaking there ah okay cool so that should work now and then for here we just want to get rid of now input this because we don't need that anymore yeah i think just because i'm just going to leave that there because i'm sure it took quite a bit of effort on my part i just don't even remember and i'm going to go ahead and center this um because we probably want that centered and then i guess i could take this and god damn it go like this a little bit and we could take the enter button and also move that a little more center oh yeah we i want to send her the whole thing that's why but the panel is obviously that so we want to grab okay let's do that whatever there's no real way to do that uh there is but uh it's okay let's group them both to the center here let's go like that and then we'll put the enter button also at the center here go like that it also doesn't need to be perfect it just needs to look like pleasing enough right that looks good enough to me okay [Music] okay now let's get this shot so i'm gonna start here oh yeah that's about to pop up down here at the bottom see 7 52 am here 7 52 a.m what day is it there saturday oh i don't even i don't know anything in life man why are you up at 7 52 bro i mean i i i i pretend like i don't wake up that early but i usually wake up at like 6 37 anyway just not not technically naturally usually i probably got like 7 30 by myself um but uh my dogs wake me up i would like to be able to hit enter to enter those but that's it's some very high quality stuff so hit stop i'll hit completed now if i go to chapters oh no i'm sorry i need to go hit stop so we can do that i'll hit enter i'll hit enter oh i know what is happening did i exit out of it am i stupid bro okay um on enter button yeah so we no longer need this check is the thing yeah all right save now can i do this nice okay now if i go to chapters now it exists hey there we go we've got the intro and then we've got the time that i made that task and then so all i have to do is just copy and paste this and uh into my things and there we go i've automated that process a wee bit okay so that is the first part um i would love to have actually have a little button here to check that off because that feels real good um okey-dokey i forgot the only the ending point really matters but anyway oh no pirate all right so my girlfriend said she's ordering indian food which to me is a fantastic thing but then i didn't see the word that followed that saying or presumed prefixed it which was a vegan indian food nothing against vegans it just doesn't taste as good all right i mean it's just true it's it's a it's a true fact right i've had some delicious vegan food but uh i guarantee if you made that non-vegan it'd be a little better that's all i'm saying that's all i'm saying and don't mean to offend nobody okay so now what we're going to do is why i actually i actually want to make things a little more like working there so that so essentially the problem i'm trying to solve is that the here we have a uh the chat scraping script is being run always and i don't want it to be run um unless i essentially tell this chat player to do it so let's go scrape is not on here so where the hell is scrape it's not in chat not in game scenes interesting uh loading main scene oauth2 task manager should not be in there huh hmm okay let's go up here project product settings auto loads get python chat scrape where the hell did i put that so it wasn't chat scraping oh that's gd never mind for some reason i thought that was a python file okay cool cool cool cool cool um so here's this what's your plan for today codelangomorph why do i need the port and ship here i mean that's probably someone could probably hack me but you know i beg of you please don't um i actually have a defense program that swats the ip address who tries to hack me right so i would be uh careful i'm just kidding i don't know what the i'm doing okay notification what so okay now this is good this is the ready process we want that on youtube api okay no we're connecting youtube like connect broadcast received and then whenever that happens then we are doing this right live stream you url plus equals that start listing start scraping okay so what we want to do is essentially just make this uh its own function so start listening start scraping [Music] so we do i want to leave that and then success broadcast receipt okay so we don't need this any longer we'll do this get rid of this oh we don't want this connected anymore [Music] do i want that as like a check to have the to make sure that i receive the broadcast id from youtube i think i'm going to put the check elsewhere so essentially in the main scene here when i'm running this i would like to be able to like go um like down here to the bottom of the screen and click chat and then have the chat start up because there's going to be times where i don't want the chat or at least i want to hide the chat or something like that i mean i guess i do want it to start automatically don't i yeah i guess i do i get i do um [Music] i don't know i'm at a loss because i'm just trying to think of the the possibilities here so if it starts automatically that's probably the one i'm rarely going to start a stream and not want the chat to be displayed down there and if it does i can just hide it but the problem is like i think that's a problem i can deal with later on um but like essentially if people are chatting and it's hidden do i give them experience or not because i want to make this like kind of like a game um so that's the problem with that but uh let's see what's in the debugger here oh god why do they do this okay so so i'm actually going to go back to the get python chat script and i'm going to do this again and then i'd like to have like a a flag called listening and then so i can say oh is broadcasting okay so is broadcasting either true or false start listening beautiful is broadcast so we can always check if it's broadcasting okay so i'm gonna keep that open uh then we'll go back here so our chat manager okay and then so by default so i'll show you what happens uh for anyone who's still here so if we run this it i've made just a basic animation system where if someone chats it'll it'll say their chat right there um and stuff like that but um what i'd like to do now is rearrange the whole thing because i think putting it up in the top left is not a good idea like that's going to block out and i don't know if it's that's not going to be there no one see anything right now oh wait what the heck wait i'm not tripping yeah okay nevermind i'm tripping i'm tripping sometimes because it's yeah never i'm not gonna explain myself i don't have to export myself to you um uh okay so yeah so if you can imagine if this was like up here that would be blocking like all of this i mean granted it would only be as visible as this but it's a lot more stuff so i think putting it like down here would be a much um better idea and i was actually going to make it more much more horizontal like kind of like this like taking up this whole space but uh now that i look at it i probably also want people to be able to see the output here although this is a better space this is this is an even better dead space except when i'm in a script oopsies when i'm in a script oh same deal same deal and mostly the output that's going to be all over here is not super duper relevant okay so that's what i'm going to do i'm going to change it to do that um so here's that go to this um i want to put it in the center i'm sorry not center bottom and then i'm going to change the some some things about the min size here see do i have anything coding it it's not a tool script so we should be good um this one okay so we hmm what do we want the height to be oops not that i want to run this okay so probably i'd probably want the height to be a little less than what it is what if we set the min size to 400 or 450 ah that's the wrong one we probably want this to be like 800. oh why is that happening my monitor just freaked out ah okay that was gonna happen i'm actually for right now i'm going to shut that off because as you can see i just blocked all your guys's view of what i was doing and i forget that um okay so we probably want that like that and then i'm going to reduce the height here to 500 oh this needs to be 500 first let me do that okay and then we'll do center bottom and now let's see how that looks oh wrong one again this one that's like perfect that's i mean i probably need a teensy bit bigger but i'm also gonna make the chat player different right now um because sorry so we know that this is you know that this is 800 in the x so if we make a chat player by default oh we probably don't want it uh we could probably stretch this to 700 huh size that okay and then oh wait a second didn't i deny newly oh yeah that's okay that's actually kind of cool okay so we'll do 700 why why is it two forty three three round numbers only oh because i minimized it as small as possible all right well then you know our floats are probably gonna change that in a second anyway because this doesn't need to be this long you know what i mean um so we've got this v box container here is the identifier and then i think i want to put the um these things in to here like that yeah exactly like that actually okay and then in between here we'll go ahead and add a v separator just like that i want to put this right there and then we can custom styles style box line this color and then we can adjust the thickness oh so it's a v separator um oh vertical that's why okay cool set this to three just really look like that's a little thick here if i zoom in i can actually see what the hell i'm doing okay let's make this let's just make it two two looks good and then um i think we can adjust i think that's not what we want custom constants oh there we go beautiful that allows us to adjust the separation so make this 15 something like that okay and then actually i think what i'll do instead of that is to actually just adjust this separation here to something like uh 10 like that cool and then we'll go to level label and i'll change this to say i think we're going to say lv1 [Music] the other problem with this is that we're also going to potentially have icons right here right so it's going to really smush this thing and then um you know it's going to be real small if we got an icon as well i mean the icon will probably only be like that big but this does make this much much smaller doesn't matter how big is this thing that's only 40 nascar i'm gonna undo everything i just did everything we're putting it back to the old the old thingamajigga okay now we're back bot studio what's going on man i don't know how long ago you said that okay so we got the player name got the experience got all this schtufa um now it's time to hook it up to this bad boy [Music] oh so i've got some like uh test things transition in tween okay so this is just transitioning in and then this is the stuff that i added for testing purposes that we no longer need physics process that's all good give xp beautiful on timer timeout okay that's all good that's all good thanks man glad to be finally back on it for a little bit um trying to make this system that is for uh streaming right and so i've kind of demoed it a little bit but i'll show you in a second exactly how cool this cease when this starts to work hopefully okay so let's again run this this should yeah so there's the live chat coming in which is great uh yeah a little what i'm streaming oh she thought i said i want a little we're talking about marijuana folks um okay so at 500 it's not quite that's that's the smallest it can get okay so we know that these are 243 so 500 should be fine but it's i guess it's just not is the mark how big is the margin on this thing it's 40 so that should work no no it will not work let's make this uh five five forty center bottom okay and now if we think about how much it's going to take up this is going to take up like right there so that should be okay why you always in the moon oh you know what i just realized that we can make this as long as we want um dude okay so i don't think it's gonna let me redo everything i just did yep nothing to redo that's great that's fine um because we can potentially so let's now i have to actually go look at my obs studio here so i kind of have to guestimate this i guess and then just kind of mess with it until it looks good let's see if that looks right um and then all right let's go to maine i'm gonna go ahead and add chat oopsies chat manager scene writer okay and then we'll run this okay now we can see so that's gonna that's gonna be like potentially the chat boxes and that's definitely too thick so i think what i'm gonna do is narrow that down thin these out and then spread this out so it comes more to there um it's kind of cool in that like you're seeing me make this in real time okay so probably something like this and then uh probably want to okay so we want the size and the x oopsies that's the wrong thing i just messed with uh that's not the wrong way i'm surprised that worked okay so min size is uh let's do like 1200 i think that looked all right now let's even do let's do 1400 that looks alright and then we can take the y value down to 400 oopsies 400 okay and then we'll do actually we'll do from the bottom right okay and then we'll do and then we want to like this is the the tough part is that we're never really actually going to be able to oh keep forgetting you can't do that you have to click to move oh my god dude just stop it okay so something like that like that how's it looking not bad all right yeah i don't think that's bad at all especially because i'm gonna make it um a little less obtrusive there you know like when there's not chat which is gonna be a lot of the stream it's going to be i'll probably just make it less visible than this whoa my mouse is pretty bad less visible than this thing honestly because this i feel like i'm going to have stuff here that you actually want to you'd be able to see like oh what did he work on this if there's no chat here this can be invisible you know what i mean or practically invisible like 0.2 opacity so that's cool um yeah but that is looking good i think that's that's definitely good enough okay so now what i want to do is fix this chat player again so we'll take oh this is a horizontal yeah so we'll get rid of that just gonna stick these in here we can get rid of this okay and then we can take the the whole thing here you know the whole panel container and then we can do this and so this we could probably extend the y up to like a thousand like oopsies the x out to a thousand twelve hundred [Music] okay so now we have to do quite a few things to fix this up um so we'll go to this and i'll again go to the separation and i'll put this at like 15. so it's actually pretty good there okay uh and then again i do want to add a a v separator we've got some styles new starbucks line separation two make this white and then we'll put that right there okay and then level level label let's see l b l v one oh my mouse is diana cold hard death also we have the opportunity to put an icon here um so the idea is that just knock my mic out okay once you like level up to some amount like we'll probably make it like level 10 or something level five you'll be able to customize what color your name is level 10 you can add an icon you know this level you can like i don't know like you can have command effects like add effects to the screen stuff like that the idea is that like we give people experience for watching my streams um yeah okay so let's take this and minimize that um and then so what i want to do is fix the progress bar because that it's also this is all going to break the script so we have to go to glow bar change this to color correct um okay so we just gotta oopsies why does that not work so everywhere it says xp oh we should have to change xp for identifier there we go okay now let's see if this works no breaking cool nothing i swear i heard my phone go off but it did not i dare say that's not thick enough there we go yeah i like them thick when i was in emt which is if you don't know like a it's like kind of like a mini paramedic we don't need nearly as much and we're kind of grunts of the the healthcare system um there was this really funny really vulgar dude and he was ironically muslim which is typically a very strict religion obviously and uh just always always was talking about chicks and he was such a weird dude and he was like bro you like skinny girls and i'm like are like do you like girls you like them fat do you like them skinny and i was like uh i guess i guess skinny he goes nah bro me i like them thick in like a really thick like arabic accent this guy he was so funny i loved him i didn't like working with him though because he would like say this he had like no situational awareness and he would like say this in front of like nurses um and or like not like right in front of them but like he would just not think like they could hear him but we're like not even five feet away from the nursing station just absurd he was i'm surprised he didn't get like sued or like you know someone didn't complain to our company because it was inappropriate um but also hysterical he showed me this picture of this girl he was so proud and she was like oh beasts and i was like oh he's like yeah i like them thick bro i was like all right whatever floats your bro your boat man um okay so anyway the reason i want to do this is because so we have this right now on expand which i do not want i don't want it to expand uh all i want to do is set the min size x to something so we say like 200 maybe nope let's do 400 that looks like a reasonable amount of xp to like grow you know what i mean no i mean okay so we've got the player name level and we've got this um there's a lot of customization to be had here [Music] because we've got this and we've got auto wrap is on i think that's fine okay and so now if we go to or we can just run the whole thing here oh did i set the size not the min size um i can the okay this is dying um progress bar yes i did i set the size not the mid size so this what i have 400 yeah that looks good very very nice okay and now i can shrink it a little more even which is nice because it is a little bit too thick just like he likes them um i think we could probably knock this down to 300. of course why would you go the way i want you to go huh oh my god don't make it easy for me please i'll hit it when it is nope that's too small god damn it 340. yeah it looks good that looks like a nice little little thing okay cool cool cool cool cool cool cool um now i'm gonna get like your guys's chat actually coming in here um and so to do that be real fun i guess we'll do this on ready okay so we're gonna get rid of this and then what i want to do is connect it up with the get python chat scrape and then so here in the process function it is returning to us these packets right process pids append array packet print packet if it's chat print packet key input packet okay so this is pids okay so basically pids are the process ids of all the functions and the reason i do this is so that because i'm opening like several python scripts and web scrapers this adds all the pids of all those scripts python scripts that i run to a list and then when i quit the app it runs through that whole risk list before it quits godot and quits those and kills those processes um so yeah that's that and then here right now what we're doing is we're printing chat i've also made it so that uh we have key input here and this uses a python script that takes like uh so i can use i i can do hotkeys in the future but i have to get that working because there's a lot of considerations i have to think about with that um but anyway chat so right now what we're doing is just printing the packet right um and this should just be a list of all the peers um yeah so there should be a list of everything so what i'm going to do is i'm going to say i'm going to make a new signal so i'm going to say signal chat packet received okay and then we'll say chat packet okay and so essentially we're going to now go emit signal chat back it received and then we're going to say packet okay beautiful now we need to do is go into this script and i'm going to connect that signal in our ready function here so we're going to say uh yeah probably right here is gouda we're going to say what is it get get python chat scrape dot connect chat packet received self and then i always just take this let me go on chat packet received and i'll make that function okay wait why don't why don't you like these oh i forgot to put a there you go okay cool cool um yeah i'll put that right here pass and then of course we need to add that chat i'll just i'll just keep it as chat and then this is going to be type array um and that's just to keep me like aware of what that isn't also so that way i can type hint for stuff and like get the functions quickly okay so on chat packet received so we've connected this and so when this receives a packet um what is it going to do well we want to spawn oh we need to get the information of what it is so we'll say for chat in packet and then i'll say no for uh user in packet i don't know um comment there we go yeah i'm say comment i guess i guess it's a live chat comment uh four comment in packet which is saying chat on the yz packet for a comment in chat and we'll say print comment and there's a good way we can just check if everything's working here um ah i okay this is a problem with the chat manager [Music] so i've actually done this in a weird way oh yes the reason i did this this way was because go to mouse and then we need to go pass that that's why that is happening but um the reason i did this with this way was because i want to have this button here so when one of them is hidden we can do that and then we could say show chat or hide chat um which is good but i should uh i'll deal with that in a second because that's pretty low on my list right now i just need to make it get this working okay no i don't need to be here we need to be here and then we'll just run it okay and now what it should do is print why do these chat manager oh it's because i just added it here okay so we need to this first of all i'm going to rename this to chat manager troll okay and then main i'm actually just going to delete that and then we're just going to add it again you don't i mean yeah it's just better to do it that way some things like don't sink over when you save which is weird but this should have yep so that's on pass now and hopefully nope what the fudge bro and then i'd imagine that if i just delete this and run this then it's going to detect my mouse again okay so yeah so is that but it doesn't quite make sense why it is that because it says pass what if we just put ignore there we go okay so that works yeah we also don't need that to be interactive whatsoever except yeah we'll put like a little x here to hide chat or something oh yeah we'll put a little like high chat show chat button right there but anyway let's see how it looks on obs or more importantly on youtube yeah that doesn't look like too distractive especially once you know once i make the code so that it tweens uh transparent i think that'll be great um but it is currently not we should be getting these packet receive signals from no we're not because i didn't click the start button okay wait for it oh it's not going to spawn them yet it's just going to print oh what roll that's whack okay let's see what went wrong there first off let's just print hello here make sure that yeah so that is that ready get popular escape.connect this and that so it should be right now already connected right so if i do this let's actually just print okay run this it should say oh it's not saying connected right away is this in chat player oh i'm stupid dude i'm so dumb um dumb dummy dummy dummy da dum dum okay we need to put this in chat manager bro okay okay and then go here uh what was i thinking i wouldn't be surprised if this work first try hey it worked but uh it's not getting the whole chat i guess it's only getting the most recent chats because the window's too small no no that's just because that's all the chat in the in the thing okay but that's fine all right so you can see who is anyone still watching me two people still watching me alright so we've got bot studio down there in the chat and he's left three comments and so what we can do now is uh actually spawn in for him so we can say four chat and comment so you can zero is the person so i could do something like this for comment in chat var user equals comment zero and then we'll say var and i might eh i don't know we'll see and then we'll say var i know we can't say oh we can just say comment equals yeah font comment equals uh or comment one and then oh the no this isn't the wrong one again dude this shouldn't be in there this should be in this one this script okay okey dokey there's this and then yeah there we go okay and then what we want to do is then just spawn a chat player and uh so we'll do a spawn chat player and then well right now i do want to actually put this in and then i want to go yield get underscore tree dot well we shouldn't we shouldn't actually do it that way we should actually add a a timer here i'll do it i'll just do it this way uh no we'll do it this way so i'm gonna add a yeah i'll add a timer here right here okay and it's gonna be ah i'll just call it a timer okay so idle time the wait time it's gonna be a one shot timer um we don't wanna auto start and the wait time i'll put is like point uh like half a second maybe we'll start oh yeah we'll try that okay um and then what i'm gonna do is come in here and say on ready bar uh on ready bar chat timer equals timer um cool okay and then we'll come right here spawn job player and then we'll say timer oopsies uh chat timer dot start and then we'll yield for chat underscore timer and then we want to yield for timeout okay so we'll start the timer and then wait till it times out um at the end of each of these blocks and so that way if there's like too many chats coming in at once um yeah if there's too many chats coming in at once this will like space them out a little more evenly so we should see that because botsu's got three comments hopefully those are still there and it doesn't refresh those uh again that won't be a problem in real life because i'll be starting this from the before it happens okay on chat fax receive chat array oh yes we want to actually integrate our user and comment information into the player instance scene um actually i want to really quickly look up the init function and it should not be called manually overrides initializes that okay called once during initialization can you add arguments to that i don't know i don't know how to use it that's a horrible description obviously well no it makes sense it's called during initialization but i can't add arguments to it like i could like a real init typically um oh can you hear the mic pick those ones up man all right so the idea is that uh i can't assign a bunch of variables here oh i have it right here playerinfo and then i i don't think i have any way to so name icon and we need to put xp of course and then here we need to put something and then something so subscribe to acv honors for games okay and then this will be uh comment yeah comment i'll actually change this to user cool oh needs a comma okay then for right now what we'll do well we don't need to do all those but uh okay we don't want that in already yes we do this is chat player okay i keep getting confused which script i'm in so we are in chat player if we want and then ready before anything happens what we want is to set all of these values um do the correct things so we want to say i can't know okay so we've got icon we want to say name [Music] name label dot text and we're gonna equal we can do set text but it doesn't really matter name label.txt equals player info uh user user okay and then we'll say level no not level label comment label comment label dot text equals uh player info comment okay right now that's fine i mean eventually we'll want to actually you know customize all of it but uh hopefully that will work now what we do is in what we want this chat manager while we are in ha what we do is in spawn chat player we're going to take two arguments user and comment change that to name oh we can't use the word name right that's uh that's problematic yeah we'll just change that we'll keep it as a user okay so say user comment okay and now of course before we add the child we simply go player instance dot player info hmm okay just to get this like quick and dirty get this working i think i am just going to do this so playerinfo um and then we'll say user equals user okay and then let's do this playerinfo comment equals comment okay so we're setting those and then it's gonna be there all right let's give it a shot see if this works it's loading the first time it takes quite a while to load the comments all right and there you go dude okay and then they slowly disintegrate like that um so here let's type one in i can't type one there but i should be able to go hello i'd wonder how long that's gonna take i should take at least six seconds right there's a six second latency and then after the six seconds it should pop up here oh awesome so the second it pops up in my live chat it pops up there so you can see that pops up now obviously i need it to give me but it's saying acb games and it says what i say it's like boss studio if you want to try that i mean i would love to see someone else other myself or something what's going on it's good though because the second it shows up on the actual chat it comes up here what's going on so that's great that is very very good okay so that's very good that's that means that's working so the reason i was kind of like tripping out a little bit before is that this is going to be very bulky um once we start getting into uh like i mean there's a lot of things to fill in for this right so we need the xp we need the icon um user comment icon let's go chat player just like visualize it so we need the name the icon well i guess we'll calculate the level we just need the name name icon comment and xp so that's only four things okay so that's actually not that bad right yeah that's everything we're going to need oh that's not true because i want people to eventually be able to like customize the color of the stuff if they get enough like chat experience going on i can't believe people were so unimpressed with that we've lost followers but anyway this is kind of working right now um i i don't know if i'm going to figure out the the xp tonight my chat i think is tomorrow at 11 so i think i'm going to take the rest of the night off relax and then hopefully try to finish off getting like actually giving xp to people tomorrow because i would love to because it's i i think that stream is going to pop off but real quickly what i do want to do before i'm done the final last touch is to actually um make this kind of fade itself in and out so we've got this script obviously and i only want it to be visible when um when one of the this chat right so if this should be receiving that on chat packet received so ready i'm gonna say modulate dot a equals um uh we'll do like 0.2 maybe 0.25 so here i'll do another constant alpha value and we'll set this equal to uh yj we'll just do 0.5 we'll do 0.5 right now 0.5 okay and then we'll say alpha value okay and then we're going to need two things we're going to need a tween actually for the tween i'm kind of down i really like doing um on readyvar tween equals tween.new and this works just fine except we have to do we do have to add it to the tree it let's just do let's just do it this way okay so add between oh yeah and then so right now what i would want to do is do a make a signal right here well actually we'll keep player signal so we'll say sign right technically signals are supposed to here signal uh later player fading okay and then i'll say dying i hate naming stuff i don't know if that's just me but it's like i feel like the hardest part of programming sometimes okay so uh signal player fading and then essentially right here on timer timeout we're doing all this stuff right and um how to start one shot okay cool uh then what we're going to do is on this we're going to say q free right where it says q free what we're going to do is then say emit signal um uh okay mid signal player fading okay then in chat manager this chat manager um what we're going to do is every time we spawn a player we're going to say player instance dot connect um why is it not there player fading there we go to self and then obviously we'll say on player fading on player fading just like that okay and then obviously i need to make that function on player fading pass and then what we'll do every time a player fades is we will check the um chat box yep so we'll check chat box and we'll say if chat box dot get child count there we go equals equals zero then we'll start a tween to fade ourselves back to um invisible right so then we'll say did i get the tween i did not get between on ready bar tween equals tween and then here we'll say tween dot interpolate prop abigail she could just walk right by me i have no idea android prom property self oh no actually that's fine yeah okay self and then we'll go modulate hey there we go there's a food here it's been here oh just got here yeah okay okay okay initial value so initial value is going to be our modulate dot dot a and then on player fading if chat box is empty if there's no more players between interplay property self from our our modulate from our current modulate down to our alpha value um okay we'll do this over zero seconds i'll do a tween trans sign and then we'll do an ease out just like that okay and then um that's actually correct oopsies emphasis then we'll do between dot start okay and then all we need to do is that on chat player here would not spawn chat player but on chat packet received um we will say modulate dot a equals one okay and then yeah and then so we do that in the ready function so we should be able to test this out now so as you can see it's it's it hasn't uh updated there but uh wait i'll start this hello why did it not work i needed it to work because i'm pretty over this right now eh first of all chad timer needs to be at least a full second because that's absurdly fast ah i think i'm gonna say less than or equal to one wait why is the time up again oh no man okay that worked cool i mean i could definitely see some some issues with that but um yeah that's gonna be it for today thank you guys for watching uh make sure to tune in tomorrow um for the live good o q a stream i've got a little google form for you to check out if you want to submit anything just hop onto my discord the link is in the description and uh head on over her and then in announcements we got uh here's the google form right here in fact i can just drop that into chat except i don't think it works in chat so never mind but yeah you just fill out the form quick and simple little you know put your name put your question uh and then you can go and even check it's not this one uh there's a link to the stream and then you can also check what other people said okay so we got a few only three so far but that's fine is that these fine ah yeah lots of formatting issues with that but that's good anyway yes thank you guys so much for watching uh i'm out and
Info
Channel: ACB_Gamez
Views: 92
Rating: undefined out of 5
Keywords: godot, inde, game development, unity, OBS, OBS Studio, LiveStream, Live, Game
Id: PA7ZHSz4-So
Channel Id: undefined
Length: 169min 43sec (10183 seconds)
Published: Fri Nov 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.