- Home /
Scripting text/dialogue onto an object
Hello internet, I'm working on my first game, and the only major thing I have left to do is to add text. I have four objects that I want to "speak" to you when you click on them (not necessarily a dialogue, since you don't say anything back to them, but I'm not sure what else to call it). I've tried some timed text scripts, but those are clunky and require finesse that is a bit beyond my current programming level. There's got to be an easier way to add a simple click-though text box. Any advice?
Answer by Piflik · May 07, 2012 at 06:03 PM
I would create an array of Text Objects and cycle through them on mouseclick. Then display them on GUI on top of a dialog box.
Then I'd add a variable that is increased every time a new text is displayed. This variable is tested against the array length, and when it reaches the end, the object is destroyed or disabled.