scripting commands
by abc · in Torque Game Engine · 05/04/2003 (7:19 am) · 9 replies
Hi!
Is there anywhere I can read or maybe just see what scripting commands there actually is, well not only commands. I mean all game variables that is IMO "hidden".
Is there anywhere I can read or maybe just see what scripting commands there actually is, well not only commands. I mean all game variables that is IMO "hidden".
About the author
#2
05/04/2003 (7:58 am)
thanks alot
#3
I'm using the GUI Editor in the TGE, but I don't know what commands I need to give in order to accomplish this. I tried Canvas.popDialog, but it doesn't seem to work with your own art.
Any help, or pointing me to a nice list of scripting commands would be appreciated. Thanks.
08/11/2006 (8:48 am)
That "here" link appears to have been removed. I'm looking for some scripting commands. I'd like to know how to make my own bitmap pop ups for stuff like "Wrong answer, try again." Then when you click OK, the pop up should go away. I'm using the GUI Editor in the TGE, but I don't know what commands I need to give in order to accomplish this. I tried Canvas.popDialog, but it doesn't seem to work with your own art.
Any help, or pointing me to a nice list of scripting commands would be appreciated. Thanks.
#4
Some basic GUI cmds are:
08/11/2006 (9:13 am)
Show me your script. popDialog isn't art dependant!Some basic GUI cmds are:
Canvas.popDialog(myGui); Canvas.pushDialog(myGui); Canvas.setContent(myGui); myGui.visible = 0; myGui.visible = 1; myGui.add(someGui); myGui.remove(someGui); myGui.setValue(value); myGui.setBitmap(bitmap);
#6
This didn't work. Instead, it causes the TGE to freeze. The mouse will no longer respond after I click that button.
I could easily throw it into a script, but I think the problem might be how I'm switching to the "pop-up" GUI. I have been using Canvas.setContent(WrongAnswerGui); because this is the only one that actually causes it to show up. However, this must not be correct, because if it were the right way to do it then when I moved my mouse around the screen, it wouldn't leave a trail, and Canvas.popDialog(WrongAnswerGui); should also work.
So if you know the command I need to use when I want to call a pop-up GUI, please let me know.
08/11/2006 (9:38 am)
Well, as of right now I don't have an actual script. I was just trying to use the Command line of a button to close the GUI with Canvas.popDialog(WrongAnswerGui);This didn't work. Instead, it causes the TGE to freeze. The mouse will no longer respond after I click that button.
I could easily throw it into a script, but I think the problem might be how I'm switching to the "pop-up" GUI. I have been using Canvas.setContent(WrongAnswerGui); because this is the only one that actually causes it to show up. However, this must not be correct, because if it were the right way to do it then when I moved my mouse around the screen, it wouldn't leave a trail, and Canvas.popDialog(WrongAnswerGui); should also work.
So if you know the command I need to use when I want to call a pop-up GUI, please let me know.
#7
Put simply, you have one GUI open (WrongAnswerGui). You're then executing a cmd to close that GUI. So, now what do you have? Nothing, this is why you're seeing mouse trails.
Try creating a main GUI which is always open, and pushing / popping other separate GUI's from that.
08/11/2006 (9:48 am)
It sounds like you're closing your GUI successfully; however you're not pushing a new GUI to take its place. This isn't necessary if the GUI you're popping is a child of an already existing parent control.Put simply, you have one GUI open (WrongAnswerGui). You're then executing a cmd to close that GUI. So, now what do you have? Nothing, this is why you're seeing mouse trails.
Try creating a main GUI which is always open, and pushing / popping other separate GUI's from that.
#8
Furthermore, pop still doesn't seem to work. Even though it has a parent, it will not close the GUI. Could this be because I have a GUI box as the parent of the OK which closes the GUI box? Can it not pop something of which it is a child?
I used visible = 0 and 1 and that seemed to work alright, but I don't think that will stop users from pressing buttons behind the pop up while it is up. That's why I want to get push/pop to work...but I'm assuming that they will force users to press OK to proceed. I don't know, maybe visible will work?
08/11/2006 (10:12 am)
Okay, now I have it working in a way. The problem is that when I push the GUI, it decides to take up just about the entire screen rather than the area I have set for it.Furthermore, pop still doesn't seem to work. Even though it has a parent, it will not close the GUI. Could this be because I have a GUI box as the parent of the OK which closes the GUI box? Can it not pop something of which it is a child?
I used visible = 0 and 1 and that seemed to work alright, but I don't think that will stop users from pressing buttons behind the pop up while it is up. That's why I want to get push/pop to work...but I'm assuming that they will force users to press OK to proceed. I don't know, maybe visible will work?
#9
Thanks for your help, Tim. =)
08/11/2006 (1:09 pm)
Yay...I finally got it working. At first I was trying to push the child inside of the main GUI, but that didn't work right - if at all. So then I tried pushing a totally separate GUI, the WrongAnswerGUI, and that worked. Then when I popped it, it went away just like I wanted. :OThanks for your help, Tim. =)
Associate Ron Yacketta