OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: ModestNovice on 26 Jun 2009, 08:46:50

Title: Close all active dialogs?
Post by: ModestNovice on 26 Jun 2009, 08:46:50
Hello everyone, I was wondering if there is a way to close any open dialogs?

As I have this scenario in a menu with 2 Buttons:
< = Goes back to last dialog
X = exit current and any other dialogs

Thanks,
DaChevs
Title: Re: Close all active dialogs?
Post by: Wolfrug on 26 Jun 2009, 11:36:46
I believe the topmost dialogue is always closed when you use closeDialog 0. As to closing -all- open dialogs, well...um. I'm sure there's some smarter way as well, but:

Code: [Select]
for "_i" from 0 to 100 do {closeDialog 0; sleep 0.02};
Which simply runs 100 closedialogs consecutively, which should get rid of most open dialogs I'd say ;) (change to 10 or 2 or whatever if you want)

Wolfrug out.
Title: Re: Close all active dialogs?
Post by: i0n0s on 26 Jun 2009, 16:19:45
Code: [Select]
while {dialog} do {closeDialog 0};;)
Title: Re: Close all active dialogs?
Post by: ModestNovice on 26 Jun 2009, 22:44:30
thanks guys :)