UI_close_gumps

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

UI_close_gumps

Post by agentorangeguy »

Anyone else having trouble getting the gumps to close automatically when they should? I was making an egg for "something on" to alert sleeping dragons when the avatar is looting their goodie stash. I've used UI_close_gumps but having no luck getting it working.

Code: Select all

void DragonAttack 3029()
	{
	var dragon_list = UI_find_nearby_avatar(504); //dragon shape
	UI_close_gumps(); //added this to see if it would work
	if (event == EGG)
		{
		UI_close_gumps(); //added both versions to see if one would work
		UI_close_gump();
		for (npc in dragon_list)
			{
			UI_close_gumps();
			npc->set_schedule_type(IN_COMBAT);	
			}
		}
	}
Maybe i'm doing something wrong since I'm a bit rusty?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps

Post by marzo »

UI_close_gump closes a single gump, which MUST me passed as a parameter; UI_close_gumps closes all active gumps.

Your issue is another: eggs don't trigger when gumps are showing.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Paulon

Re: UI_close_gumps

Post by Paulon »

Relating to closing gumps and dragons, a suggestion for a SI mod would be to close all gumps when using the ritual blooding device on an NPC, assuming one of the current mods or Exult doesn't already do so at this point. It's been quite a while since I played.

The nickel and dime them to death approach of using the ritual blooding device with a gump open was always a tempting cheat against a powerful foe like a dragon in SI.
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps

Post by agentorangeguy »

Ohhhh okay, I kept thinking the "something on" eggs that trigger combat if you take the item off of the egg closed the gumps, but thinking back I guess that was the "Bad avatar" function where they'd call the guards or the Guardian would say his spiel?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps

Post by Knight Captain »

Would a delay and then the command work?
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps

Post by marzo »

It will make no difference; the delay will start ticking away once the gumps are closed.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Locked