Request to update message command description
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.
Request to update message command description
I was trying to use message option variable functionaliy and found out that
Incorrect:
Correct:
UPD. wiki says "either the index or the value of the chosen option will be stored in the specified variable". I expected the option index to start from 0, but it starts from 1.
UPD 2. Pitfall - option index corresponds to only visible options. I.e. index of the first visible option is 1, even if there are several hidden options before it (because of [show_if)].
UPD 3. If option image is omitted, then option value key is ignored #3980
variable
key must be placed directly under the message
tag. But on the wiki it is placed under the option
tag. See https://wiki.wesnoth.org/InterfaceActio ... message.5D Please update the wiki.Incorrect:
Code: Select all
[message]
speaker=narrator
message=_"Select unit"
[option]
message=_"Orcish Warrior"
variable=unit_index
[/option]
[option]
message=_"Orcish Slayer"
variable=unit_index
[/option]
[/message]
Code: Select all
[message]
speaker=narrator
message=_"Select unit"
variable=unit_index
[option]
message=_"Orcish Warrior"
[/option]
[option]
message=_"Orcish Slayer"
[/option]
[/message]
UPD 2. Pitfall - option index corresponds to only visible options. I.e. index of the first visible option is 1, even if there are several hidden options before it (because of [show_if)].
UPD 3. If option image is omitted, then option value key is ignored #3980
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.
Re: Request to update message command description
Thanks. Most of this has been done by gfgtdf and me. Only remaining is UPD 2.
Please consider signing up for a wiki account
Please consider signing up for a wiki account
Re: Request to update message command description
Thanks josteph. I've updated the wiki with the UPD 2 item.
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.