Game Development Community

Start Game Button

by Fucifer · in Torque Game Builder · 06/05/2006 (8:05 am) · 8 replies

Outstand job with RC1 and the tutorials. I am try to get start game button to work. I have the button appearing and it will push but nothing happening. So I guess I have the wrong command. I setup quit button to see it work and it work find. Thanks!

#1
06/07/2006 (11:44 am)
Do you mean nothing is happening when you click the button? It was hard to understand what you mean given the limited description of the problem.

if You have a GUI button, you can set your command in the "Command" Edit box under "Parent" on the right hand controls in the GUI editor.

could be as simple as adding a function call to Command.
StartGame();

Alternatively you can modify the command in the GUI file itself
new GuiButtonCtrl() {
         profile = "GuiButtonProfile";
         horizSizing = "right";
         vertSizing = "top";
         position = "8 432";
         extent = "133 21";
         minExtent = "8 8";
         visible = "1";
         command = "StartGame();"; <---- edit here
         helpTag = "0";
         text = "Start Game";
         groupNum = "-1";
         buttonType = "PushButton";
      };

In either regard, if this isn't what you needed help on, maybe clarify your question and reask..
#2
06/07/2006 (1:57 pm)
Yes nothing is happening when you click the button.
#3
06/07/2006 (2:02 pm)
Would it be possible to post your GUI file so we could get a better understanding of why?
#4
06/07/2006 (2:42 pm)
Sure, it work find in TLK, TGE but will not work in TGB RC1. I did a quit buttom that work find and did score button and that works.

new GuiButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "relative";
VertSizing = "relative";
Position = "333 50";
Extent = "112 24";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "StartGame();";
hovertime = "1000";
text = "Start Game";
groupNum = "-1";
buttonType = "PushButton";
};
#5
06/07/2006 (2:48 pm)
Hum mine was just an example, do you have a StartGame(); function then?

If so place an echo in that function and see if its firing maybe?

function StartGame()
{
          echo("Button Works!");

         //startup Level code goes here....

}
#6
06/07/2006 (4:05 pm)
Yes, I do but TGB just crash so I lost the whole file.
#7
06/07/2006 (4:09 pm)
Well I'm not sure whats going on there. Something seems odd. Sorry I couldn't be of more help!
#8
06/07/2006 (5:10 pm)
I going way for RC2, i get some wierd stuff now, i dont know what going.