insert_tag doesn't work inside filter_location ?
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.
-
- Posts: 876
- Joined: November 28th, 2008, 6:18 pm
insert_tag doesn't work inside filter_location ?
The [and] tag inserted by [insert_tag] is apparently ignored here:
I had to apply [insert_tag] in the parent tag [set_menu_item]:
... and it worked
(I had to use 'spoiler' because 'section' doesn't work)
Spoiler:
Spoiler:
(I had to use 'spoiler' because 'section' doesn't work)
Last edited by SlowThinker on January 27th, 2011, 5:43 pm, edited 2 times in total.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
Re: [insert_tag] doesn't work inside [filter_location] ?
That's because [insert_tag] is an action tag and can only be placed in [event] and special cases such as [message] (on occassion). [filter_location] is NOT an action tag so it can't take [insert_tag]. I'm surprised it worked in [set_menu_item] - I'll have to keep that in mind.SlowThinker wrote:The [and] tag inserted by [insert_tag] is apparently ignored here:
Re: [insert_tag] doesn't work inside [filter_location] ?
How do you know it is ignored? What is the content of the "and_tag" container?SlowThinker wrote:The [and] tag inserted by [insert_tag] is apparently ignored here:
No it isn't. It can be used in any place where variable substitution (e.g. $something) would work. In fact, it is just variable substitution for containers instead of values.bigkahuna wrote:That's because [insert_tag] is an action tag.
Re: [insert_tag] doesn't work inside [filter_location] ?
I tried it and it works just fine for me.SlowThinker wrote:The [and] tag inserted by [insert_tag] is apparently ignored here:Spoiler:
-
- Posts: 876
- Joined: November 28th, 2008, 6:18 pm
Re: [insert_tag] doesn't work inside [filter_location] ?
Thank you for the help and sorry for the dumb question
My mistake was I cleared add_tag:
My mistake was I cleared add_tag:
Code: Select all
# first and_tag is created
[set_menu_item]
id=10_recruit
description="Recruit Unit"
[filter_location]
# and_tag is accessed
[/filter_location]
[command]
[/command]
[/set_menu_item]
{CLEAR_VARIABLE add_tag}
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
Re: [solved] insert_tag doesn't work inside filter_location
Well that's really cool. How do you know where variable substitution works? Is there a list or some criteria that it would have to fulfill?silene wrote:It can be used in any place where variable substitution (e.g. $something) would work. In fact, it is just variable substitution for containers instead of values.
Re: [solved] insert_tag doesn't work inside filter_location
[insert_tag] may be used everywhere inside [event], with the exception of [set_variables][literal]
(and there may be a few other places where it works)
(and there may be a few other places where it works)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: [solved] insert_tag doesn't work inside filter_location
Does variable substitution work somewhere outside [event]s ?Sapient wrote:(and there may be a few other places where it works)
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: [solved] insert_tag doesn't work inside filter_location
Anonymissimus wrote:Does variable substitution work somewhere outside [event]s ?Sapient wrote:(and there may be a few other places where it works)
It works inside subtags of [menu_item], and some [story] parts. In the future hopefully the entire contents of [scenario] will support tag insertion. Unfortunately the relevant code is spread out over a lot of places.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."