ok. in my game i have my starting screen with two options to click on:
- START GAME
- LOAD GAME
the start option is fine but i don't know what script command to use to bring up the load game screen.
another problem i have is: i am using a verb coin gui (i did the scripting myself, and it nearly killed me :o ) but when i want to click on one of the above options, i have to bring up the verb coin. is there a way to be able to click on an option without having to bring up the verb coin gui?
First question:
It depends on whether you're using a custom Load GUI, or the default one. If it's the default one, RTFM:
Quote
RestoreGameDialog
Displays the restore game dialog, where the player can select a previously saved game position to restore.
The dialog is not displayed immediately; instead, it will be displayed when the script function finishes executing.
Example:
if (IsKeyPressed(363)=1) RestoreGameDialog();
will bring up the restore game dialog if the player presses the F5 key.
See Also: RestoreGameSlot, SaveGameDialog
If it's your own, you'll need a bit more scripting (what exactly depends on how the GUI is set up).
Secondly:
Again, it kind of depends. I guess you only want to ignore the verbcoin in the startup room? You could add a condition to
on_mouse_click to stop the verbcoin from appearing in the start room, e.g. (Warning: pseudocode - probably won't work as is):
if (button == eMouseLeft) {
if (player.Room == 1) { // Player is in first room
ProcessClick (mouse.x, mouse.y, eModeInteract); // So process clicks normally
}
else { // Player is somewhere else
//Do verbcoin code
}
Or you could make an
on_mouse_click that ignore the verbcoin in the start room's Room Script, and use
ClaimEvent() to make it run instead of the main one (again, pseudocode):
//Room script for Room1
function on_mouse_click (MouseButton button) {
ProcessClick (mouse.x, mouse.y, eModeInteract); // Process clicks normally
ClaimEvent(); // Blocks global on_mouse_click
}
//rest of room script
But, the easiest way might be to have your 'New Game' / 'Load' buttons on a GUI -
on_mouse_click isn't called on GUIs, so the verbcoin shouldn't be activated.
THANK YOU SOOOOOOOOOOOOOOOoooooooooooooooooo much!!!! ;D this makes my game so much better and more professional