Menu_Item through a campaign
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.
Menu_Item through a campaign
I have a menu item defined in scenario 2 that is supposed to show a map when the user clicks. Then, at the end of the scenario, as I found no tag to delete it I just changed showing a message to inform the user that no map was available.
In latter scenarios, no message would show up.
Arriving to another scenario, the 7th, I wanted to show the user a new map so
in the prestart event. But doesn't work. I take a look at the save file and I find
This is located at top level. This would follow the instructions given at the end of the scenario 2. I find also this
twice in the scenario tags.
What is going on? What do I have to make a correct substitution of a Menu Item?
thank you
PD: Something that maybe a bug. When displaying messages, for the whole campaign it worked fine with
But in my last scenario would show another unit's portrait and name. I changed from "description" to "speaker" and it worked. ??
In latter scenarios, no message would show up.
Arriving to another scenario, the 7th, I wanted to show the user a new map so
Code: Select all
[set_menu_item]
id=showmap
description= _ "Show Map"
[command]
[message]
speaker=narrator
image="Maps/TheThan.png"
[/message]
[/command]
[/set_menu_item]
Code: Select all
[menu_item]
id="showmap"
description="Show Map"
needs_select="no"
[command]
[message]
#textdomain
message=_ "No map available"
speaker="narrator"
[/message]
[/command]
[/menu_item]
Code: Select all
[menu_item]
description=_ "Show Map"
id="showmap"
needs_select="no"
[command]
[message]
image="Maps/TheThan.png"
speaker="narrator"
[/message]
[/command]
[/menu_item]
What is going on? What do I have to make a correct substitution of a Menu Item?
thank you
PD: Something that maybe a bug. When displaying messages, for the whole campaign it worked fine with
Code: Select all
[message]
description=theunit
message= _ "blabla"
[/message]
That's ridiculous, dragons have no windows...
Re: Menu_Item through a campaign
hmm.. that's not supposed to be possible to have two menu_item's with the same ID. try zip up your campaign and post it into a bug report.
by the way, to make it invisible, all you have to do is set the [show_if] to always be false...
by the way, to make it invisible, all you have to do is set the [show_if] to always be false...
Code: Select all
[show_if]
[not]
# never show
[/not]
[/show_if]
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Menu_Item through a campaign
My campaign is too big.
I attach the two scenarios and the latest save file
I attach the two scenarios and the latest save file
- Attachments
-
- LTD_Prodo's_keep-Auto-Save1.gz
- (53.76 KiB) Downloaded 195 times
-
- 07_TheTan.cfg
- (12.27 KiB) Downloaded 185 times
-
- 02_the_swamps.cfg
- (10.5 KiB) Downloaded 186 times
That's ridiculous, dragons have no windows...
Re: Menu_Item through a campaign
If your campaign is too big for .zipping then obviously you can remove the big parts which are big images and music.
Re: Menu_Item through a campaign
Well, I guess this makes a difference.
- Attachments
-
- Love_To_Death.zip
- (1.81 MiB) Downloaded 183 times
That's ridiculous, dragons have no windows...