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.
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.
#2
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
And Presto!

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!
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!

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!
Torque Owner AzraelK