In GMS2.3+ there are a few things to be aware of. One is that in defining arguments for scripts (functions) you don't have to manually type in arg[0] = ... etc. Just do function create_textbox(_text,_speakers){} You may notice that I added a "_" to text and speakers. This is because we aren't abstracting them to arguments so otherwise we would be writing text = text later, which doesn't make sense. To set the text variable in tbox to the passed argument, we must give the argument a different name. Also, we specifically can't use anything.name anymore. .name is a built in term used by the new sequence system, so it's best practice not to call anything "name" anywhere in our code. Instead use speaker_name or _name or something.
this was SO helpful thank you so much!!! i was wondering why i was getting errors! this tutorial series is fantastic, but unfortunately there are some parts that need to be tweaked for the newer versions of GM. thank you so much for adding this, you're a total lifesaver!
@@cody7689 let gamemaker know your frustrations. they are changing the code for the worse. this build that she is working on was the only stable build of GMS2 I've worked on
This is why I love coming to you for help on GMS2. You're VERY helpful, easy to follow, and you're still uploading. I'm glad you're still making videos! Most of the other GMS2 content creators have gone dark on RUclips. Here's to many more videos!
Thank you! Yes, I've been spending a bit of time working on some personal projects and may not be updating as frequently, but I am definitely not done with this series and still want to make a lot more videos :)
@@FriendlyCosmonaut that's wonderful to hear! best of luck on your personal projects. I know I'll be checking in to see when this is updated along with any other tutorials you are putting up. Thank you!
just found your account and im soooooo thankful!!!! ive been searching for tutorials for days and i managed to stumble across yours. theyre exactly what i need!! thank u so much
I love your videos! They are an absolute life changer. I love the way you teach, informative but at a really nice pace. Please continue making them when you are able. *All the support*
Now that I'm caught up on the series, I finally understand how exciting it is when you post a new video! This is the only tutorial series that makes it easy to customize if I want to make changes. After trying to advance my game based on several other tutorials, I've decided to just wait until you post more videos. Your clarity and efficiency is unmatched. Thanks Friendly Cosmonaut! I'll be on Patreon as long as you keep posting.
Your tutorials are the best! I really like the speed, many other tutorials on yt are boring because they progress way too slow. I hope this series never ends
You should be getting a lot more attention then right now, most people barely explain how to do it, they just write it, show it and then tells why it works, its like i dont want to know why it works, i want to know how it works and when/where to put it in
I already had a scrolling text system working but watching your videos has helped me simplify it. Thanks a bunch! I'd love to see you create a scrolling text system that allows the player to make a choice during the dialouge that changes the flow of what is said.
Is anyone else having a problem where it takes an extra press of the "E" key after a conversation has ended to initiate a new conversation? I can't figure this out for the life of me.
I seem to be having an issue where the text box isn’t appearing even after pressing E a couple of times, I haven’t done any of the tutorials previous to the dialogue tutorials, your tutorials really helped so if you could give me advice on this problem, that would be great!
Did you ever find out the solution to this? I have the same issue as you, and I only did her textbox tutorials as well. I'm assuming it's because I have a different collision system
great tutorial but i have a question, in the last part of the video you show how to evoid creating multiple textboxes, but if i want to generate another one i have to press 2 time the interact key couse the condition for checking if the box exist is still in the check of the interact key, and is pretty annoying that i have to press id 2 time , how con i solve it?
I had the same issue, and in-case anyone else comes along here's a clunky solution. You can move the "active_textbox = noone;" into a with(obj_player) block in the destroy event of the obj_textbox, similar to how FC made the bandaid for NPC movement.
I FOLLOWED THIS WHOLE TUTORIAL FOR A TURN-BASED RPG (JUST SKIPPING FARM PART AND CODING THE BATTLE SYSTEM). THANK YOU SO MUCH. BTW, WHY AREN'T YOU UPLOADING NEW VIDEOS LATELY..
If I wanted to, could I do all three things(portrait, name box and text box, ) on the same sprite instead of separating them? if so, would there be any drawbacks to using this strategy?
How do I make it so different characters have different fonts in a cutscene setting? I'm using your cutscene video's method to create the cutscenes and using that method to draw the textboxes. Also just wanted to say your videos have really helped me out as I trudge through learning this stuff.
Hey sorry for the late reply - I'd say you could pass along a variable that says who is talking if you haven't already to the textbox object. Then in the draw event, just check what that variable is equal to, and set draw_set_font(whatever) accordingly.
Hello, i know i am late but i hope you can answer this to me, well, i use this dialog system, but i am having trouble because of the array speakers, in my conversation it is very big, and i think there is not a way to clean a spot in an array, so if i want to make a smaller conversation, what do i do with this arrays? OBS: sorry for the bad english, i`m Brazilian
Thanks a lot! I have one question... I can make the NPC textbox appear once, but then when I press the interact key again, it won't show up... why could that be?
AMAZING tutorial! this is such an usefull system, and you are great explaining it! ty soo much :D Btw, i'm having a small issue where if i use the interaction_key outside of the radius with an NPC it will crash stating that tbox is not set before reading. I'm sure its fairly easy to fix but just tought about asking! Thnx in advance.
I have a question do you know how to make pixel perfect collisions between 2 moving objects so both objects move sometimes to each other sometimes both in same direction but different speeds, also one of the objects moves inside and along with the other one because it's kind of a moving room so the collision works when both go in same direction but not in opposite
I'm not exactly following what you're describing, but regardless of the type of movement, pixel perfect collision should be able to keep objects from going inside each other. You'd just have to have some sort of check to see if there is a placemeeting between the following object and the follower, and if there is, then move the follower as close as possible to the other one, and stop short of overlapping. This logic should be exactly the same as the logic we set up back in tutorial 1 :)
I'm having a rather bizarre issue where I need to press input_interact twice to get to the next page. I adjusted some code to fit my own project, so I probably messed something up somewhere, but did anyone experience something similar to this? EDIT: Did the tutorial over again from the beginning, it's working now. Pretty sure it was related to the interact_key variable somehow.
for your inventory, how would I remove a certain item/amount, check for an item/amount and add an item/amount, i could use this for mining resources, crafting system, rewards.
I'd say creating a general script for removing items would be handy for this. It could follow the same sort of logic that we set up for when you drop an item with the right mouse button - but instead of using co-ordinates to get what sort of item it is etc, the script would just take in the item.object and you could specify what amount to remove/add. I'll likely do this when I continue with the series but until then, I'd say go back over those inventory videos, grab the code for removing/adding items, and adapt it to suit your needs. Unfortunately depending on your game and what you want, the scripts could end up being very different, so it's hard to be specific!
Hey I've just been adding your dialog system to my game and I followed your video exactly (or so I thought lol) I keep getting an error message when I push the action key on a NPC. The short version is "Push :: Execution Error - Variable Index [0,1] out of range [1,1] - -1.speakers(100037,1) " The error is coming from the "create_textbox script". Can I contact you privately somehow to show my code and see if it's right?
@@chris514ish If yours is still not working, I found out that I had 3 lines of text in my npc but only 1 [id]. For example: I had speakers_ = [id]; but since I had 3 lines of text I needed to add 3 [id] arrays like speakers_ = [id, id, id];
@@Kyle.r.12 how did you fix this? I think my brain just hasn't started working today but I am wondering about the logic you used in the script to fix this up.
Hopefully this will get seen, but I was wondering if FriendlyCosmonaut or anyone had any ideas for how to display different portraits for multiple NPS's? Each NPC sprite would have 5 or 6 different frames. I have been playing around with an array but can't seem to get it to display more than one portrait.
I'll use Jack for an example I added this by creating different sprite portraits for each of my characters, with multiple frames for emotes. For instance spr_por_jack instead of a universal one Inside their create events I added a portrait variable. portrait = spr_por_jack Along with the text arrays I created a portrait index array which will change the frames of the portraits with the text 0, for instance being the happy frame, 3 being the angry frame portrait_index[0] = 0; portrait_index[1] = 3; text[0] = "Hello!" text[1] = "I'm angry!" Then in our textbox create script I removed the original portrait line FC used here and added portraits[i] = speakers[i].portrait; portraitsindex[i] = speakers[i].portrait_index[i]; This gets the speakers portrait and their portrait index for each line Now in our obj_textbox, in our User Event I added portrait = portraits[cur_page]; portrait_index = portraitsindex[cur_page]; These will be our variables we'll plug into out draw event In out draw event for our draw portrait we now have draw_sprite(portrait, portrait_index, port_x, port_y); hope this helps! make sure to remove any other lines FC had in those areas about portraits. I know this is a 4 month old post but maybe someone else might want to do this in the future so here it is :)
@@rolledfig3359 Hey, man. That worked for me, cheers. One question now though. I can't get that to work for dialogue choice strings! Could you enlighten us if you got that to work?
@@Mackievellian Hey I'm glad it worked for someone. Want problem are you having with the dialogue choice strings? Say there's 9 lines of dialogue, we'll have 9 (portrait_index[x] = x) During the choice string say it jumps from dialogue 2 to dialogue 3 or 6, for the first choice it'll use portrait_index[3, 4 and 5] and then for he second choice it'll use portrait_index[6, 7, 8] I don't think I explained that very well but I hope that helps
@@rolledfig3359 Does this work if it goes back to the obj_player? I can get it to work if the same person is talking, but when it switches back to the obj_player, always gets an error. I know this is really old, but I'm still trying to figure it out. It works with [id,id,id] but not with obj_player. I have it set up like this and always gets an error. Thanks. portrait = spr_character_portraits portrait_index = [1,0,2]; text = ["How are you?","Good, you?","Fine, thanks."]; speakers = [id,obj_player,id]
I'm getting an error that I don't understand why, but it's saying that str_len is not set before reading it. I don't know what I'm missing pls help 😖 /// btw LOVE THE TUTOIALS , I actually feel like I'm learning something. Thank you
@@virtualcakegaming3498 I've been trying to look and ask on Reddit but still no luck, it's really a weird error, I'm still asking around, if you find out please lmk
Hey guys, I had the same problem to and took me hours to try find a solution, a way i fixed it was by making sure I did not have the object textbox placed in the room, hopefully this response helps you guys
I had removed 'obj_textbox" from the text layer as Rzzz suggests, but str_len not being set persited. I had 'obj_textbox' in the Instances layer also and removing fixed the issue. I'm not sure if I placed it there idiotically or was placed following the tutorials and missed it being removed, but thought I'd mention it in case evan artocin and VirtualCakeGaming were still having issues.
Hi I've been following this tutorial using Game Maker Studio 1.4 which has been fine so far but now i'm stuck on the section that has: text = [I have nothing to say"] and Speakers = [id]. 'This comes up with an error. Is the code specifically for GMS2 or i have missed something? Should i be able to use the same function in GM 1.4? Please help. Thanks in advance
@@qlu7273 Hi, unfortunately I haven't. I can get the NPC's to talk but I cant get them to take turns talking with the player as Gamemaker studio wont accept the open brackets the way its set up above so I cant have e.g [id,obj_player,id} etc. I'm surprised you are having issues if you are using GM2!
Are you going to incorporate animal breeding in your game? I myself am making a breeding game, but it's proving to be a challenge to find out how. I definitely know it involves arrays and data structures though.
I doubt I'll do this specifically but I will likely do a crafting system some time in the future which sounds like it would cover similar concepts. (In the meantime I think there are some crafting tutorials out there if you're keen to get started!)
Hey! I too am planning to attempt making a game similar to this but with a focus on animal breeding! I thought I was completely alone with such a specific idea not many games cover. I am a complete beginner to everything except the artwork and animation portion, so I would love to know if you’ve figured anything out since you posted here. Any good resources or helpful info you’ve found regarding this concept? Thanks!
Well, 1. I think your last line is I'm hopeless 2. You know what? This is a game maker studio 2 channel which is 2D 3. Get dunked on! (PS: I'm acting sarcastic so no offence)
Drag and drop was created to make game developing easier. For now it might have some problems, but that doesn't mean we shouldn't interact with it. I use coding while there is a problem drag and drop can't solve (like lighting) and it is way easier. But I use drag and drop to come up with solutions of problems many can't solve. I'm going to continue using DND, until I make a great game with it (maybe it will take me years, but worth it). I have uploaded a video on my other channel too. I'm not arguing with you, just making things clear.
Another great vid. Recently threw my own dialog choice system on my github, actually used your Textbox tutorial during making it. Check it out if you want: github.com/bguinen/Gamemaker-Dialog-System
upd. DONE!!! and fixed!!! But now is another probloem(OH WHYYY????) Variable obj_textbox.str_len(100005, -2147483648) not set before reading it. but it was setted!! Help!!!!
Hiiii!!! its ok now, just remade whole tut, but i have another problem!!!!!Variable obj_textbox.str_len(100005, -2147483648) not set before reading it.@@Gnavin Hehehe.. ALSO it says that in scr create_textbox isnt allowed to put in text and speakers!! Thank yoU!!!
In GMS2.3+ there are a few things to be aware of. One is that in defining arguments for scripts (functions) you don't have to manually type in arg[0] = ... etc. Just do function create_textbox(_text,_speakers){} You may notice that I added a "_" to text and speakers. This is because we aren't abstracting them to arguments so otherwise we would be writing text = text later, which doesn't make sense. To set the text variable in tbox to the passed argument, we must give the argument a different name.
Also, we specifically can't use anything.name anymore. .name is a built in term used by the new sequence system, so it's best practice not to call anything "name" anywhere in our code. Instead use speaker_name or _name or something.
this was SO helpful thank you so much!!! i was wondering why i was getting errors! this tutorial series is fantastic, but unfortunately there are some parts that need to be tweaked for the newer versions of GM. thank you so much for adding this, you're a total lifesaver!
thanks so much! I noticed a .name in code turn red instead of blue; luckily someone else had solved the problem already and saved me time!
@@cody7689 gamemaker needs to stop changing their code. that is why amazing programmers like her have stopped doing the tutorials
@@lilpumpupthejam9302 I KNOW!! it's so frustrating, esp for ppl who are just starting out 😭
@@cody7689 let gamemaker know your frustrations. they are changing the code for the worse. this build that she is working on was the only stable build of GMS2 I've worked on
YES! So glad you are continuing this. Thanks so much
This is why I love coming to you for help on GMS2. You're VERY helpful, easy to follow, and you're still uploading. I'm glad you're still making videos! Most of the other GMS2 content creators have gone dark on RUclips. Here's to many more videos!
Thank you! Yes, I've been spending a bit of time working on some personal projects and may not be updating as frequently, but I am definitely not done with this series and still want to make a lot more videos :)
@@FriendlyCosmonaut that's wonderful to hear! best of luck on your personal projects. I know I'll be checking in to see when this is updated along with any other tutorials you are putting up. Thank you!
just found your account and im soooooo thankful!!!! ive been searching for tutorials for days and i managed to stumble across yours. theyre exactly what i need!! thank u so much
I love your videos! They are an absolute life changer. I love the way you teach, informative but at a really nice pace. Please continue making them when you are able. *All the support*
Now that I'm caught up on the series, I finally understand how exciting it is when you post a new video! This is the only tutorial series that makes it easy to customize if I want to make changes. After trying to advance my game based on several other tutorials, I've decided to just wait until you post more videos. Your clarity and efficiency is unmatched. Thanks Friendly Cosmonaut! I'll be on Patreon as long as you keep posting.
Thanks so much!! :)
Your tutorials are the best! I really like the speed, many other tutorials on yt are boring because they progress way too slow. I hope this series never ends
Your tutorials have helped me a lot. I'm waiting for more!
You should be getting a lot more attention then right now, most people barely explain how to do it, they just write it, show it and then tells why it works, its like i dont want to know why it works, i want to know how it works and when/where to put it in
Thanks so much, this is definitely my goal when I'm making tutorials!
Thanks very much for your vids FC! I've learned a lot from you and I always enjoy the neat ways you present your code and make solutions succinct.
I'm pretty sure this is your most helpful video I've ever watched. Thanks.
I already had a scrolling text system working but watching your videos has helped me simplify it. Thanks a bunch! I'd love to see you create a scrolling text system that allows the player to make a choice during the dialouge that changes the flow of what is said.
This is still a amazing series you should definitely keep this going!
I know right. I checked the date on the video and I was like WTF?
@@micahgmiranda Yea I am very interested in the finishing of this series. I am learning so much!
Is anyone else having a problem where it takes an extra press of the "E" key after a conversation has ended to initiate a new conversation? I can't figure this out for the life of me.
@ if(key_interact){
if(active_textbox == noone){
var inst = collision_rectangle(x - radius, y - radius, x + radius, y + radius, objNPC_parent, false, false);
if(inst != noone){
with(inst){
var tbox = create_textbox(text, speakers);
}
active_textbox = tbox;
}
} else {
if(!instance_exists(active_textbox)){
active_textbox = noone;
}
}
}
Explain please :)
I love this series, Can you make a video for buying/selling?
I seem to be having an issue where the text box isn’t appearing even after pressing E a couple of times, I haven’t done any of the tutorials previous to the dialogue tutorials, your tutorials really helped so if you could give me advice on this problem, that would be great!
Did you ever find out the solution to this? I have the same issue as you, and I only did her textbox tutorials as well. I'm assuming it's because I have a different collision system
I'm getting portrait/name/voice but then there's no text, just an empty textbox. Anyone have a guess at what I did wrong?
I need help with this too. Let me know if you figured it out
I'm also getting this issue, I've tried for hours now to fix it but I don't know where I went wrong :(
Same here. I'm thinking it has something to do with the create_textbox Script with the newer version of Gamemaker...
anyone have any idea why it might force quit the launcher when i interact with an npc?
great tutorial but i have a question, in the last part of the video you show how to evoid creating multiple textboxes, but if i want to generate another one i have to press 2 time the interact key couse the condition for checking if the box exist is still in the check of the interact key, and is pretty annoying that i have to press id 2 time , how con i solve it?
I had the same issue, and in-case anyone else comes along here's a clunky solution. You can move the "active_textbox = noone;" into a with(obj_player) block in the destroy event of the obj_textbox, similar to how FC made the bandaid for NPC movement.
@@---we1ok lmao so glad for this thx
Will you continue the series? I hope so! Thanks to you I learned GML and how to use GM!
you should have plenty to work with .. your imagination will have to kick in sooner or later to make an actual game
Great video, can you implement a npc schedule like in stardew valley ?
Yes that's definitely on the to-do list for upcoming videos :)
I FOLLOWED THIS WHOLE TUTORIAL FOR A TURN-BASED RPG (JUST SKIPPING FARM PART AND CODING THE BATTLE SYSTEM). THANK YOU SO MUCH. BTW, WHY AREN'T YOU UPLOADING NEW VIDEOS LATELY..
Subscribing. PLEASE continue this series to completion!! No one actually finishes their tutorials =(
Great video! Thanks for posting!
Another great tutorial, thank you for your time :)
If I wanted to, could I do all three things(portrait, name box and text box, ) on the same sprite instead of separating them? if so, would there be any drawbacks to using this strategy?
How do I make it so different characters have different fonts in a cutscene setting? I'm using your cutscene video's method to create the cutscenes and using that method to draw the textboxes. Also just wanted to say your videos have really helped me out as I trudge through learning this stuff.
Hey sorry for the late reply - I'd say you could pass along a variable that says who is talking if you haven't already to the textbox object. Then in the draw event, just check what that variable is equal to, and set draw_set_font(whatever) accordingly.
Cant wait for the next episode!
Problem with duble chek "active_textbox" :
Delete code after "else" and in Destroi Event (oTextBox)
with(oPlayer) {
active_textbox=noone;
}
Where is the next video?
Now you should make the portrait_index,voice... as a struct.
Hello, i know i am late but i hope you can answer this to me, well, i use this dialog system, but i am having trouble because of the array speakers, in my conversation it is very big, and i think there is not a way to clean a spot in an array, so if i want to make a smaller conversation, what do i do with this arrays?
OBS: sorry for the bad english, i`m Brazilian
Is this series going? i loved it so much
Thanks a lot! I have one question... I can make the NPC textbox appear once, but then when I press the interact key again, it won't show up... why could that be?
could you tell me how to make obj_player stop moving when textboxt open? thanks for the video,thank you!
AMAZING tutorial! this is such an usefull system, and you are great explaining it! ty soo much :D
Btw, i'm having a small issue where if i use the interaction_key outside of the radius with an NPC it will crash stating that tbox is not set before reading. I'm sure its fairly easy to fix but just tought about asking! Thnx in advance.
Thank you so much for the tutorials. I was wondering , are you still going to be adding to these?
I have a question do you know how to make pixel perfect collisions between 2 moving objects so both objects move sometimes to each other sometimes both in same direction but different speeds, also one of the objects moves inside and along with the other one because it's kind of a moving room so the collision works when both go in same direction but not in opposite
I'm not exactly following what you're describing, but regardless of the type of movement, pixel perfect collision should be able to keep objects from going inside each other. You'd just have to have some sort of check to see if there is a placemeeting between the following object and the follower, and if there is, then move the follower as close as possible to the other one, and stop short of overlapping. This logic should be exactly the same as the logic we set up back in tutorial 1 :)
I'm having a rather bizarre issue where I need to press input_interact twice to get to the next page. I adjusted some code to fit my own project, so I probably messed something up somewhere, but did anyone experience something similar to this?
EDIT: Did the tutorial over again from the beginning, it's working now. Pretty sure it was related to the interact_key variable somehow.
for your inventory, how would I remove a certain item/amount, check for an item/amount and add an item/amount, i could use this for mining resources, crafting system, rewards.
I'd say creating a general script for removing items would be handy for this. It could follow the same sort of logic that we set up for when you drop an item with the right mouse button - but instead of using co-ordinates to get what sort of item it is etc, the script would just take in the item.object and you could specify what amount to remove/add. I'll likely do this when I continue with the series but until then, I'd say go back over those inventory videos, grab the code for removing/adding items, and adapt it to suit your needs. Unfortunately depending on your game and what you want, the scripts could end up being very different, so it's hard to be specific!
FriendlyCosmonaut ok thanks
Hey I've just been adding your dialog system to my game and I followed your video exactly (or so I thought lol) I keep getting an error message when I push the action key on a NPC. The short version is "Push :: Execution Error - Variable Index [0,1] out of range [1,1] - -1.speakers(100037,1)
" The error is coming from the "create_textbox script". Can I contact you privately somehow to show my code and see if it's right?
Hey, I'm having the same problem. Did you ever find the solution?
@@chris514ish Not yet. Don't know what it could be, since I followed the video. Unless it's a miss type somewhere in my code.
@@chris514ish If yours is still not working, I found out that I had 3 lines of text in my npc but only 1 [id]. For example: I had
speakers_ = [id];
but since I had 3 lines of text I needed to add 3 [id] arrays like speakers_ = [id, id, id];
Awesome job solving this. Errors with arrays can be really tricky to track down, but also really common.
@@Kyle.r.12 how did you fix this? I think my brain just hasn't started working today but I am wondering about the logic you used in the script to fix this up.
Hi. Can you make tutorial about smooth 8 directional movement?
Very good tut, thank you very much! Can I have the code you made in this series?
Thank you another video!
Hopefully this will get seen, but I was wondering if FriendlyCosmonaut or anyone had any ideas for how to display different portraits for multiple NPS's? Each NPC sprite would have 5 or 6 different frames. I have been playing around with an array but can't seem to get it to display more than one portrait.
I'll use Jack for an example
I added this by creating different sprite portraits for each of my characters, with multiple frames for emotes. For instance spr_por_jack instead of a universal one
Inside their create events I added a portrait variable.
portrait = spr_por_jack
Along with the text arrays I created a portrait index array which will change the frames of the portraits with the text
0, for instance being the happy frame, 3 being the angry frame
portrait_index[0] = 0;
portrait_index[1] = 3;
text[0] = "Hello!"
text[1] = "I'm angry!"
Then in our textbox create script I removed the original portrait line FC used here and added
portraits[i] = speakers[i].portrait;
portraitsindex[i] = speakers[i].portrait_index[i];
This gets the speakers portrait and their portrait index for each line
Now in our obj_textbox, in our User Event I added
portrait = portraits[cur_page];
portrait_index = portraitsindex[cur_page];
These will be our variables we'll plug into out draw event
In out draw event for our draw portrait we now have
draw_sprite(portrait, portrait_index, port_x, port_y);
hope this helps! make sure to remove any other lines FC had in those areas about portraits. I know this is a 4 month old post but maybe someone else might want to do this in the future so here it is :)
@@rolledfig3359 Hey, man. That worked for me, cheers. One question now though. I can't get that to work for dialogue choice strings! Could you enlighten us if you got that to work?
@@Mackievellian Hey I'm glad it worked for someone. Want problem are you having with the dialogue choice strings?
Say there's 9 lines of dialogue, we'll have 9 (portrait_index[x] = x)
During the choice string say it jumps from dialogue 2 to dialogue 3 or 6, for the first choice it'll use portrait_index[3, 4 and 5] and then for he second choice it'll use portrait_index[6, 7, 8]
I don't think I explained that very well but I hope that helps
@@rolledfig3359 hey actually figured it out but I really appreciate the reply
@@rolledfig3359 Does this work if it goes back to the obj_player? I can get it to work if the same person is talking, but when it switches back to the obj_player, always gets an error. I know this is really old, but I'm still trying to figure it out. It works with [id,id,id] but not with obj_player. I have it set up like this and always gets an error. Thanks.
portrait = spr_character_portraits
portrait_index = [1,0,2];
text = ["How are you?","Good, you?","Fine, thanks."];
speakers = [id,obj_player,id]
How could we make a system, so that the player can plow the ground?
I'm getting an error that I don't understand why, but it's saying that str_len is not set before reading it. I don't know what I'm missing pls help 😖
/// btw LOVE THE TUTOIALS , I actually feel like I'm learning something. Thank you
Im having the same problems did you by any chance figure it out yet?
@@virtualcakegaming3498 I've been trying to look and ask on Reddit but still no luck, it's really a weird error, I'm still asking around, if you find out please lmk
Hey guys, I had the same problem to and took me hours to try find a solution, a way i fixed it was by making sure I did not have the object textbox placed in the room, hopefully this response helps you guys
I had removed 'obj_textbox" from the text layer as Rzzz suggests, but str_len not being set persited. I had 'obj_textbox' in the Instances layer also and removing fixed the issue. I'm not sure if I placed it there idiotically or was placed following the tutorials and missed it being removed, but thought I'd mention it in case evan artocin and VirtualCakeGaming were still having issues.
Can someone please give me a download for the project? thank you!
Great series, do you plan on continuing it?
how can i randomize the dialogue of the NPC?
Will you be making a save/load system for this? Great series :)
Yes, definitely!
So sad the tutorial stopped please do more
Hi
I've been following this tutorial using Game Maker Studio 1.4 which has been fine so far but now i'm stuck on the section that has: text = [I have nothing to say"] and Speakers = [id]. 'This comes up with an error. Is the code specifically for GMS2 or i have missed something? Should i be able to use the same function in GM 1.4? Please help.
Thanks in advance
I'm having a very similar issue with GM2...did you ever figure this out?
@@qlu7273 Hi, unfortunately I haven't. I can get the NPC's to talk but I cant get them to take turns talking with the player as Gamemaker studio wont accept the open brackets the way its set up above so I cant have e.g [id,obj_player,id} etc. I'm surprised you are having issues if you are using GM2!
Are you going to incorporate animal breeding in your game? I myself am making a breeding game, but it's proving to be a challenge to find out how. I definitely know it involves arrays and data structures though.
I doubt I'll do this specifically but I will likely do a crafting system some time in the future which sounds like it would cover similar concepts. (In the meantime I think there are some crafting tutorials out there if you're keen to get started!)
Hey! I too am planning to attempt making a game similar to this but with a focus on animal breeding! I thought I was completely alone with such a specific idea not many games cover. I am a complete beginner to everything except the artwork and animation portion, so I would love to know if you’ve figured anything out since you posted here. Any good resources or helpful info you’ve found regarding this concept? Thanks!
Does this work with Game Maker Studio 1.4.1567 too?
TOP!
Will you be continuing this series
Yes! I'm still on hiatus but there's more I want to do in this series.
Awesome
I look forward to future courses!!!! Me and my wife both enjoy your tutorials
please, make tutorial farming for 3D games to Terrain 3D, i am happiness.
Well,
1. I think your last line is I'm hopeless
2. You know what? This is a game maker studio 2 channel which is 2D
3. Get dunked on!
(PS: I'm acting sarcastic so no offence)
can you upload the source code , please ?
google ai sent me
I do drag and drop :dd
Drag and drop was created to make game developing easier. For now it might have some problems, but that doesn't mean we shouldn't interact with it. I use coding while there is a problem drag and drop can't solve (like lighting) and it is way easier. But I use drag and drop to come up with solutions of problems many can't solve. I'm going to continue using DND, until I make a great game with it (maybe it will take me years, but worth it). I have uploaded a video on my other channel too. I'm not arguing with you, just making things clear.
For curiosity, here's my channel: ruclips.net/channel/UCrWIkAbOFFE35bqLxj_v0oQ
Nice voice DnD pleb
Another great vid. Recently threw my own dialog choice system on my github, actually used your Textbox tutorial during making it. Check it out if you want: github.com/bguinen/Gamemaker-Dialog-System
Oh awesome, I did see this one!! Great work, it looks really nifty :)
upd. DONE!!! and fixed!!! But now is another probloem(OH WHYYY????)
Variable obj_textbox.str_len(100005, -2147483648) not set before reading it.
but it was setted!! Help!!!!
Just wanted to make sure, when you say „Text“ is your code written exactly like that? It should be "Text", should it not?
Hiiii!!! its ok now, just remade whole tut, but i have another problem!!!!!Variable obj_textbox.str_len(100005, -2147483648) not set before reading it.@@Gnavin Hehehe.. ALSO it says that in scr create_textbox isnt allowed to put in text and speakers!! Thank yoU!!!