Test for set_menu_item?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Spannerbag
Posts: 759
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Test for set_menu_item?

Post by Spannerbag »

Hi,
I've got some working code but it recreates (overwrites) an existing menu item at the start of each scenario.
Whilst this all works I was wondering if there was a test for the existence or not of a menu item with a specific id?
Sort of a [have_unit] equivalent for menu items.
No big deal, just curious.
WML solution preferred if possible but lua fine also.

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Ravana
Forum Moderator
Posts: 3313
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Test for set_menu_item?

Post by Ravana »

Technically you can proxy calls that create menu items and store your own db of them. But dont see why you would need the list anyways.
User avatar
Spannerbag
Posts: 759
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: Test for set_menu_item?

Post by Spannerbag »

Ravana wrote: January 24th, 2025, 10:04 pm Technically you can proxy calls that create menu items and store your own db of them. But dont see why you would need the list anyways.
Thanks for the advice - since posting this have had an idea (another rabbit hole to explore :roll: ).
Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.18, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
Post Reply