Anybody here play CoD 4 or Halo? Really any FPS actually. In the game UI there's usually a scrolling text area in one of the corners that reports whenever one player has been killed by another and how they were killed. I'm attempting to make this effect in SC2, but I can't find any sort of scrolling text field in the dialog options. Does anybody have an idea on how to set this up?
I think you'd be fine implementing it as a single label-type dialog item: as events occur, grab the current text of the label, add a new line and the event description, and once you go over x lines, trim off previous ones. Alternatively, just store your events as an array of text entries and re-create the label's text each time an event occurs
I started something like this a while back. What you do is have revolving dialog items, and variables that set the location of the dialog item.
So,
1) You make a dialog box.
2) You place Dialog boxes a,b,c,d, and e at the locations that we will call "lines" 1-5.
3) When someone gets a kill, change the text of dialog item a. Cycle the variable "dialog used" by 1.
4) Repeat for Dialog item b,c,d and e.
5) To cycle the locations, you check if the dialog's text is == "", and if it isn't, you move all dialog items up one line, move dialog a to line 5, and change the text.
That's the basic outline. Additionally, you may want to:
6) Make the dialog text fade out (Not sure how to do this, yet), and when it becomes invisible, remove the text, and move all dialogs up one space, putting the dialog at top on the bottom.
Obviously, this is all slightly more complicated than i make it sound, because you have to have variables (I used arrays) for the y position of each dialog, which you adjust every time the dialogs scroll. I even tried having the dialog scroll smoothly, which had its merits.
Alright, I got a system working, and now I have a second question.
Is it possible to have dialog items like labels without showing the dialog background? I'd like to be able to have the text be the only thing that appears, not the background dialog image thing. Is there a way to make the dialog transparent while still showing the text inside of it?
And, now that i think of it, don't most FPS games have the dialog scroll downward, so the top item is the most recent? I just now thought of that... isn't that true, or am I imagining it?
Anybody here play CoD 4 or Halo? Really any FPS actually. In the game UI there's usually a scrolling text area in one of the corners that reports whenever one player has been killed by another and how they were killed. I'm attempting to make this effect in SC2, but I can't find any sort of scrolling text field in the dialog options. Does anybody have an idea on how to set this up?
@Timthetoolman: Go
I think you'd be fine implementing it as a single label-type dialog item: as events occur, grab the current text of the label, add a new line and the event description, and once you go over x lines, trim off previous ones. Alternatively, just store your events as an array of text entries and re-create the label's text each time an event occurs
@Timthetoolman: Go
I started something like this a while back. What you do is have revolving dialog items, and variables that set the location of the dialog item.
So,
1) You make a dialog box.
2) You place Dialog boxes a,b,c,d, and e at the locations that we will call "lines" 1-5.
3) When someone gets a kill, change the text of dialog item a. Cycle the variable "dialog used" by 1.
4) Repeat for Dialog item b,c,d and e.
5) To cycle the locations, you check if the dialog's text is == "", and if it isn't, you move all dialog items up one line, move dialog a to line 5, and change the text.
That's the basic outline. Additionally, you may want to:
6) Make the dialog text fade out (Not sure how to do this, yet), and when it becomes invisible, remove the text, and move all dialogs up one space, putting the dialog at top on the bottom.
Obviously, this is all slightly more complicated than i make it sound, because you have to have variables (I used arrays) for the y position of each dialog, which you adjust every time the dialogs scroll. I even tried having the dialog scroll smoothly, which had its merits.
Anyhow, hope this is a decent start of an idea.
@SquarelyCircle: Go
Alright, I got a system working, and now I have a second question.
Is it possible to have dialog items like labels without showing the dialog background? I'd like to be able to have the text be the only thing that appears, not the background dialog image thing. Is there a way to make the dialog transparent while still showing the text inside of it?
use "set dialog background" and set the background as an empty or 100% transparent texture
@Alcoholix: Go
Can't you just show/hide dialog background? Why won't that work? Or am I presuming that this was already considered?
@Timthetoolman: Go
And, now that i think of it, don't most FPS games have the dialog scroll downward, so the top item is the most recent? I just now thought of that... isn't that true, or am I imagining it?
Oh wow, completely looked over the Show/Hide Dialog Background action.
Yah that'll do it, lol.
And yah, my dialog does scroll downward, its good to go. Thanks for the help.