Game Development Community

Dialogue boxes

by AzraelK · in Torque Game Builder · 08/23/2006 (8:41 am) · 2 replies

In my game I want a dialog box to popup showing some communication dialogue between ships (showing the character face, would be a major plus!) but how can I do that?

the Gui is ok but what about if I want to move the text around? or if I want it to show it up in a specific place?

Any help or ideas would be apreciated.

#1
08/28/2006 (12:43 pm)
Maybe the real question how can I use the GUI to display a dialog in realtime, like the one you would find in an RPG or an adventure game
#2
08/29/2006 (2:28 pm)
Hey I finally figured out this one at least a part

You just need to add a gui TextControl to your main screen gui (you can also add a bitmap) , name it some thing like "dialog" as soon as your level is loaded, turn it invisible. with "dialog.setVisible(false)" whenever you want the dialog to popup and then set it to invisible when you want it off.

Save the gui as mainscreen.gui (or whatever name you are using for your game)

I also added this function

function followDialog(){
	%myX=$pShip.getPositionX()*5;
	%myY=$pShip.getPositionY()*5;
	dialog.setPosition(%myX+50, %myY+20);
    schedule (10,0,"followDialog");
}

And Presto!

www.theultrageeks.com/images/shooterdemo.jpg
There are some problems though, the screen position is not the same than the player (aparently due to the scales) so Im still trying to fix that part. but so far so good.

Ship dialogues coming up!