Computer Science Canada help with a classic rpg dialogue box! |
Author: | silverust299 [ Wed Aug 24, 2011 7:17 pm ] |
Post subject: | help with a classic rpg dialogue box! |
Hello. This is in fact my first time posting, so don't go difficult on the n00b. I'm trying to do start an rpg for a programming class I plan on taking later this year. one of my troubles, is that I have no clue how to make a classic rpg dialogue box. I plan on something similar to the traditional boxes, where only so many words are displayed per line, and the text works down when you press a button. My main problem is finding a way to make the characters (letters) appear one after the other, and then having them stop at the end of the line, and allow the user to continue along with the dialogue. I've got a few ideas, but they all require tedious amounts of work with functions I don't know how to use. Any help that could be given would be amazing. ![]() |
Author: | TWizard [ Wed Aug 24, 2011 11:34 pm ] |
Post subject: | RE:help with a classic rpg dialogue box! |
You can just display what you want to say but using PUT "text" and have loop and an if statement waiting until the user presses a button, then move on to the next text, though having the text appear one after another like typing, i would have to think a bit more on that. Maybe more information would be useful. If i get more ideas i will post them or if someone else posted something more useful i hope what i'v posted helps generate more ideas |
Author: | silverust299 [ Thu Aug 25, 2011 12:22 am ] |
Post subject: | Re: help with a classic rpg dialogue box! |
thanks for the suggestion TWizard. I've come up with a slightly helpful solution for myself. If I set the border and character portraits (and pretty much everything in the frame) and also give the put text a nice font, I can actually go with the put idea. one simple way to do it that way would be to have a word file with a certain width limit (say, enough to fill my dialogue box) then have a function (small and simple, to save time, like, "b" for example) which would have a getch command. It would seem as though I've got most of it. now the only two problems is having the text typed out, and taking it away after it's done. is there a way to delete text that has already been "put"? |
Author: | TWizard [ Thu Aug 25, 2011 1:58 pm ] |
Post subject: | RE:help with a classic rpg dialogue box! |
Well yes there is a way for the text to be cleared, although you would have to redraw all that's on screen again, using 'cls' will clear the screen doing this repeatedly will make the screen flicker. To fix the flicker, at the top of your program you may want to have something like 'setscreen ("offscreenonly")' then you would also have to use 'View.Update' for everything to display on screen when you need it, if you need a better example ask and i shall post. As for the text to look like its typing i'll have to look into it. Hope this helps, and if not i hope i guided you in the right direction. |
Author: | mirhagk [ Sat Aug 27, 2011 6:41 pm ] |
Post subject: | RE:help with a classic rpg dialogue box! |
Basically you want a loop that does 3 things. First it finds the next character to put on the screen (perhaps from a text file, or even simply just an array of characters, AKA a string). Secondly it will put that character. Third it will check whether the user has pressed a button. |