ID:272564
 
I'm trying to get a window to open up for the character selection for my game. It is an interface file and I was wondering if I could get it to open after I press a verb and close it after pressing a different verb. Also, how would I get it so it doesn't open right when the game starts up?

Thanks in advance.

~Element.
Element Hero creator wrote:
[...] press a verb and close it after pressing a different verb.

Look up the winshow() proc. Also, you can use winget() and check the is-visible parameter of controls to check if they're currently visible (ie if the window is open). You can also set the same parameter with winset() to show/hide a window, but that's what winshow() already does, so better just use it instead.

Also, how would I get it so it doesn't open right when the game starts up?

Edit its properties in the Interface Editor. Kind of a 'duh' answer. =P
Kaioken already answered most of this, but I'll clarify on point where I didn't like his response.

Also, how would I get it so it doesn't open right when the game starts up?

Edit its properties in the Interface Editor. Kind of a 'duh' answer. =P

Rather than being just a 'duh' answer, the basic answer is that you don't want the window to be "visible" when the game starts, so uncheck the appropriate box in the window's properties. Later you would just use winshow() to show/hide the window (which may also be hidden if the user presses a window's X button, if you allow such a thing, or presses Alt+F4).
In response to Kuraudo
Aye, I just advocate people finding the solutions on their own, for rather obvious reasons. Now, I'm sure he would have had no problem finding that checkbox independently once pointed to the Properties dialog, anyway, and then understanding it on his own. =P
In response to Kaioken
Thanks man. I got it fully working now.