phenixfulcrum 0 Posted October 25, 2002 hi, sorry for my english because i'm french. With Vektorboson's dialog tutorial (http://home.arcor.de/vektorboson/en/index.html), i learned to use dialogs and i created a dialog which allows player to follow a group with a camera (like debug spectator by Vektoboson or Spectator by Kegetys). There's a button (named 'quit' in my dialog which close the dialog with this command: closedialog 0 But if the player doesn't use this button but use the 'escape' key, the dialog doesn't close and the game is blocked on the camera view. How can i affect the escape key with the script command 'closedialog 0'. Someone know what to do ? Perhaps vektorboson will read this topic and helps me? thx a lot, Phenix. Share this post Link to post Share on other sites
uiox 0 Posted October 25, 2002 Hi, Depend what you want to do. If you don't have esc button, when user escape the dialog is close automatically. You can use predifened buttons </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Predefined controls #define IDC_OK 1 #define IDC_CANCEL 2 <span id='postcolor'> And in your dialog description: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class ButtonCancel : RscbuttonWP { idc = IDC_CANCEL; text = $STR_DISP_CANCEL; x = 0.89; y = 0.90; w = 0.1; h = 0.060; sizeEx = 0.030; soundClick[] = {"ui\ui_cc", 0.2, 1}; action = "Cancel = true"; }; class ButtonOK : RscbuttonWP { idc = IDC_OK; x = 0.77; y = 0.90; w = 0.1; h = 0.060; sizeEx = 0.030; text = $STR_DISP_OK; default = 1; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "validation = true"; }; <span id='postcolor'> May this help you (more this button is localised) uiox Si tu veux voir des dialogues un peu plus élaborés tu peux regarder dans OFPEC dans editor depot dans les pending un exemple de mission avec differents scripts traitant des dialogues. Share this post Link to post Share on other sites
phenixfulcrum 0 Posted October 26, 2002 Hi uiox, i tried the code you gave me and it works fine. On OFPEC Forum, Vektorboson gives another way to do that. If u are interested, can read his answer here : http://www.ofpec.com/yabbse....art=new I download your Action Engine and test it. It is a the better use of dialogs i've never seen before. Are u a member of the chain of command team? Because in my next mission i use the first version of the commande engine. I choose that version because i think it will be more easier for french players to understand for the first time : it will be a platoon level mission. After, i will create another mission at company lever with the CE2 phenix. Share this post Link to post Share on other sites
joltan 0 Posted October 27, 2002 one question that might be related to this: In Kegetys Spectatemode script you loose the menu after pressing ESC (for example to access the options menu, or to check the lobby). After doing this they can't switch between players anymore and if the player they are spectating dies, they are stuck at his dead body... How can I recognize that the menu isn't displayed anymore? I'd like to reopen it automatically after some time (not immediately, so players get a chance to access the menus), but being completely at a loss with dialogs, I don't know how to check for this condition? Share this post Link to post Share on other sites
GAMEER_77 0 Posted October 27, 2002 To check if the dialog is open or not use "dialog". Its all in the link above PEACE Share this post Link to post Share on other sites