Im having problems with the event any Dialog item is clicked. isnt there a way to delete just the Dialogs you want, without having to refer to Last Dialog created or Destroy all dialogs? Like give Dialogs a name and then destroy just exactly this Dialog.
Im asking because i want to make an Exit button on my screen, that cant get deleted and pops up a custom menu.
Create a dialog[n] array and set variable dialog[X] = last created dialog when you show them.
You'll also need to have a button[n] array to identify which button was pressed (for multiple dialogs)
Then, in the "any dialog item is clicked" trigger:
local variable buttonPressed = used dialog item
switch (buttonPressed)
case (button[1]) action hide dialog[1]
case (button[2]) action hide dialog[2]
case (button[3]) action hide dialog[3]
etc.
When you create a dialog, you should be storing that dialog in a Dialog variable that is set to last created dialog, that way, when you want to delete the dialog, you refer to the variable you stored it in, there is no way to just refer to a dialog by name, because a dialog doesn't have a name, it can only have a variable referencing it.
Hello fellow modders!
Im having problems with the event any Dialog item is clicked. isnt there a way to delete just the Dialogs you want, without having to refer to Last Dialog created or Destroy all dialogs? Like give Dialogs a name and then destroy just exactly this Dialog.
Im asking because i want to make an Exit button on my screen, that cant get deleted and pops up a custom menu.
Any ideas?
Create a dialog[n] array and set variable dialog[X] = last created dialog when you show them.
You'll also need to have a button[n] array to identify which button was pressed (for multiple dialogs)
Then, in the "any dialog item is clicked" trigger:
local variable buttonPressed = used dialog item
switch (buttonPressed)
case (button[1]) action hide dialog[1]
case (button[2]) action hide dialog[2]
case (button[3]) action hide dialog[3]
etc.
@Fantajim: Go
When you create a dialog, you should be storing that dialog in a Dialog variable that is set to last created dialog, that way, when you want to delete the dialog, you refer to the variable you stored it in, there is no way to just refer to a dialog by name, because a dialog doesn't have a name, it can only have a variable referencing it.
Thanks a lot for the fast response!
Ill try that right away :)
Really appreciated you guys!