[20:43:38] Dominus: Marzo, do you have an idea why UI_close_gumps() does not work in this usecode script? https://pastebin.com/qkHnpZeU
[20:44:24] Dominus: (someone asked for a more elaborate script and this was a fast and easy example that does it like the other script and fails)
[20:47:09] Dominus: USECODE_INTRINSIC(close_gumps) {
[20:47:09] Dominus: if (!gwin->is_dragging()) // NOT while dragging stuff.
[20:47:16] Dominus: <- that might do it :(
[20:49:02] Dominus: yep, that's it
[21:30:25] Dominus: any idea how to work around that without changing the Exult code?
[22:06:43] Marzo: There isn't a way
[22:06:46] Marzo: Hm
[22:07:40] Dominus: I think USECODE_INTRINSIC(close_gumps) needs some way to bool `gwin->drop_dragged`
[22:08:00] Marzo: This check was probably added because something bad might happen if the gump where something was being dragged to/from was destroyed during the drag
[22:08:34] Dominus: yes, very likely. I wouldn't dare to just eliminate that check
[22:08:38] Marzo: But yeah, we should add a way to do a delayed close gump
[22:09:32] Marzo: Create an issue, assign it to me, and remind me over the weekend
[22:09:37] Dominus: :)
[22:09:44] Dominus: thanks will do.
[22:10:40] Marzo: I think that the original game had ready/unready events triggered by scripts like those of execute_usecode_array
[22:10:59] Marzo: So that the ready/unready code only happens after the gump is closed
[22:11:20] Marzo: But I might be misremembering some research I did so very long ago, so take this with a grain of salt
[22:12:30] Dominus: hmm, yes.
[22:14:37] Dominus: The guy who does the Ultima 6 conversion brought it up. He has two events that need it: equipping a storm cloak and the amulaet of submission that should behave like the black sword and just re-equip when placed somewhere outside of the npc container