ZNorQ 0 Posted August 17, 2012 I want to make sure that if the player dies, any open dialogs shall be closed. I use the following code in my player death event script; if (dialog) then { closeDialog 0; }; I see the closeDialog takes an IDC argument (ref. wiki), however it seems that you can put any argument as IDC. Is this assumption correct, or does it matter? If it matters, how can I return the current openDialog IDC? (I thought it was IDD for dialogs).. ZNorQ Share this post Link to post Share on other sites
riouken 15 Posted August 17, 2012 (edited) This closes the current active or focused dialog, if you want to close a spacific one then you can include its IDC in place of the 0. Dialog 0; ---------- Post added at 01:54 PM ---------- Previous post was at 01:48 PM ---------- The IDD is the way to refrence the entire dialog, you use a IDC to refrence a spacific control of said dialog, if you needed to update a list box you would use its IDC. IDD's are not normaly needed as you normaly don't need to acceses the whole control after its created, so most people use : IDD = -1; But if you did need to acceses it later, fo instance to assign an eventhandler to the dialog or to save a variable to its namespace then you would need to give it a unique IDD, and then use that later in your scrip. Edited August 17, 2012 by Riouken Share this post Link to post Share on other sites
ZNorQ 0 Posted August 17, 2012 Hey Riouken, Thanks for the feed back on the closeDialog 0. However, I don't think I agree with you on the IDD vs IDC; I'm pretty sure IDD is for dialogs, and IDC for controls. Anyway, "closeDialog 0" implemended! :) ZNorQ Share this post Link to post Share on other sites
riouken 15 Posted August 17, 2012 Yea, I'm typing on my phone and I reversed them. ---------- Post added at 02:09 PM ---------- Previous post was at 02:07 PM ---------- I realized my mistake and was editing it when you replied. Share this post Link to post Share on other sites
ZNorQ 0 Posted August 17, 2012 But if you did need to acceses it later, fo instance to assign an eventhandler to the dialog or to save a variable to its namespace then you would need to give it a unique IDD, and then use that later in your scrip. Yes, I'm pretty familiar with dialogs and eventhandlers, iuNamespace etc. :) I've made my fair share of dialogs. Displays however, those I haven't gotten around to familiarize myself with yet.. ZNorQ Share this post Link to post Share on other sites