1. Is there a script command which can open an external file, similar to WinExec in MFC for example. So for example, I could open website when the user clicks a certain button from within the game?
2. Is there a way to easily reset the game? I know there is RestartGame() but that would take the player back to the main menu. What I want is for the player to be able to click New Game during another game, and for it to go straight into the actual start of the adventure, without taking him to the main menu.
3. Is there a way to hide/show GUI buttons during runtime? I.E If I was doing a Demo and Full Version of the game. For the full version I wouldnt want any BUY NOW! buttons to be displayed, but I would in the demo. Ideally I'd like to be able to switch the buy buttons on and off by changing just one variable.
Thanks in advance!
1. I don't think so.
2. SetRestartPoint
3. With AGS v2.7 you will be able to easily switch GUI controls on/off with the .Visible property, but with AGS v2.62 you have to move them away with SetGUIObjectPosition.
Quote from: Nexic on Wed 16/02/2005 10:36:14
1. Is there a script command which can open an external file, similar to WinExec in MFC for example. So for example, I could open website when the user clicks a certain button from within the game?
No. Also in full-screen mode that would be mildly problematic. What some games do is write their own 'front end' program in, for instance, Visual Basic, that allows you to play, config, read help, go to webpage or uninstall.
Quote
3. Is there a way to hide/show GUI buttons during runtime?
As strazer says, or alternatively set their image to something empty, or put them on a different (but overlapping) GUI that you can turn on/off separately.
Thanks for the help... again!
Quote
1. Is there a script command which can open an external file, similar to WinExec in MFC for example. So for example, I could open website when the user clicks a certain button from within the game?
The others have answered your actual question but here are a few asides:
- There are script command that allow you to read and write to external files.
- There is a RunAGSGame() script command that allows you to open another AGS game. This is done for example, to do an arcade game within an adventure game kind of thing.
- AFIK there isn't currently a way of opening a website. However, you could simulate something like that using my previous two comments.
cheers
Quote
3. Is there a way to hide/show GUI buttons during runtime?
I prefer SetGUIObjectEnabled(GUI, int object, int enable). This will make your GUI button non-clickable. Note that instead of making it invisible, it will just grey it out. This is exceptionally handy if you have a button used for inventory items.