if (button == 9) {
SetVoiceMode(2);
}
if (button == 10) {
SetVoiceMode(1);
}
?
Have you set the buttons' "Left click" action to "Run Script"?
donno what that means?
but my other buttons work fine.
In the "GUIs" pane of the editor, when you select the button, does the entry "Left click" in the little white window say "Run Script"?
If it does, are you sure they're buttons 9 and 10 ("Object 9" in title of the little window)?
If you are, can you please post the whole content of your interface_click function?
leftclick=run script (defualt)
objects are corect
here is the script
function interface_click(int interface, int button) {
// calling our function for clicks over GUISAVELOAD:
if (interface == GUISAVELOAD) interface_click_SaveLoadDialogGUI(button);
if (interface == ICONBAR) {
if (button == 1) { // show inventory
show_inventory_window();
}
if ((button == 3) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
// scroll down
game.top_inv_item = game.top_inv_item + game.items_per_line;
}
if ((button == 2) && (game.top_inv_item > 0)){
// scroll up
game.top_inv_item = game.top_inv_item - game.items_per_line;
}
if (button == 4) {
SetCursorMode (MODE_WALK);
// But, override the appearance to look like the arrow
// SetMouseCursor (6);
}
if (button == 5) {
SetCursorMode(MODE_TALK);
}
if (button == 6) {
SetCursorMode (MODE_LOOK);
}
if (button == 7) {
SetCursorMode(MODE_USE);
}
} // end if interface ICONBAR
if (interface == INVENTORYA) {
// They clicked a button on the Inventory GUI
SetCharacterSpeed(EGO,GetSliderValue(1,4));
SetMusicMasterVolume(GetSliderValue(1,5));
if (button == 0) {
// They pressed the OK button, close the GUI
SetCursorMode (MODE_WALK);
GUIOff (INVENTORYA);
}
if (button == 1) { // quit
GUIOn(QUIT);
}
if (button == 3) { // about
Display("The Quest To Zooloo [[Copyright (c) 2005 Yotam Elal");
}
if (button == 2) {
GUIOn(GUISAVELOAD);
}
if (button == 9) {
SetVoiceMode(2);
}
if (button == 10) {
SetVoiceMode(1);
}
}
if (interface == QUIT) {
if (button == 1) {
QuitGame(0);
}
if (button == 2) { // quit
GUIOff(QUIT);
}
}
}
Hm, looks okay to me, no braces problems.
The buttons are on the INVENTORYA gui, yes?
To check if the script gets executed at all, do this:
if (button == 9) {
Display("Voice only, no text");
SetVoiceMode(2);
}
if (button == 10) {
Display("Both voice and text");
SetVoiceMode(1);
}
If the messages are displayed, how do you know the SetVoiceMode commands are not working?
What does (not) happen in your game?
it displays the speech...
but it doesn't shut of the text?????
The text is not displayed only if there's a voice speech file defined and present.
it works fine...
:o)
(BTW: I Didn't solve random character walking in walkarea)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19465.0
:o(