Search found 1170 matches
- 24 minutes ago
- Forum: Lua Labs
- Topic: [GUI] selecting multipage
- Replies: 0
- Views: 10
[GUI] selecting multipage
Currently, I'm doing this: dialog.unit_info_mp:add_item_of_type("empty_page") dialog.unit_info_mp:add_item_of_type("unit_info_page") ... dialog.unit_info_mp[2].unit_info_preview.unit = wesnoth.units.find{ id = unit.id }[1] dialog.unit_info_mp.selected_index = 2 I'd like to be doi...
- Today, 3:21 am
- Forum: Lua Labs
- Topic: [GUI] various questions on lining stuff up
- Replies: 1
- Views: 2580
Re: [GUI] various questions on lining stuff up
I fixed issue #1 by setting vertical_alignment="top" on the column that contains the grid that contains the left "half" of the dialog. local dialogDefinition = { T.tooltip { id = "tooltip" }, T.helptip { id = "tooltip_large" }, T.linked_group { id = "ar_p...
- Yesterday, 1:05 pm
- Forum: WML Workshop
- Topic: result of conditional with invalid qualifier
- Replies: 2
- Views: 85
result of conditional with invalid qualifier
WML and I don't get along real well. It does a lot of things I don't like, I assume in the name of being "user friendly". I'm just not sure if this is one of those times, or if it's a bug (I'm strongly in favor of the latter). In the following code, [harm_unit] always happens, regardless o...
- Yesterday, 12:23 pm
- Forum: WML Workshop
- Topic: traits
- Replies: 15
- Views: 332
- Yesterday, 6:10 am
- Forum: Lua Labs
- Topic: Can add-on register key pressed while gui.show_dialog is active? e.g. >a<, >space< ...
- Replies: 10
- Views: 276
Re: Can add-on register key pressed while gui.show_dialog is active? e.g. >a<, >space< ...
I don't know if you could make the text_box invisible, I've only found doing that for a dialog (background). I was thinking maybe, MAYBE, you could hide it by putting it in a panel and then drawing something over it so you couldn't see the box, use focus to force it to get attention, and on_modified...
- Yesterday, 3:04 am
- Forum: Lua Labs
- Topic: Can add-on register key pressed while gui.show_dialog is active? e.g. >a<, >space< ...
- Replies: 10
- Views: 276
Re: Can add-on register key pressed while gui.show_dialog is active? e.g. >a<, >space< ...
A text_box, focus(), and on_modified?
Sorry, I'll be quiet now.
Sorry, I'll be quiet now.
- Yesterday, 3:00 am
- Forum: Lua Labs
- Topic: Custom dialog placement
- Replies: 12
- Views: 234
Re: Custom dialog placement
I wonder if you could make the dialog transparent, then position the widgets carefully so it appears the dialog is where you want.
- April 16th, 2024, 4:38 pm
- Forum: WML Workshop
- Topic: Terrain - cave path, castle overlay, lit
- Replies: 3
- Views: 120
Terrain - cave path, castle overlay, lit
I can do a cave path+lit or a cave path+castle overlay in the map editor (which I'm very weak with). But can I do a cave path + castle overlay + lit?
- April 16th, 2024, 4:22 pm
- Forum: WML Workshop
- Topic: Filter weapon special in attack_anim
- Replies: 1
- Views: 82
Filter weapon special in attack_anim
I'm creating a suicide bomber. When it attacks on offense it explodes, killing itself and damaging all adjacent units for the attacker's hitpoints. I have all this working, but I can't get the sounds right. I want it to use explosion.ogg when the special is active, and lightning.ogg when it is not (...
- April 16th, 2024, 2:37 am
- Forum: WML Workshop
- Topic: traits
- Replies: 15
- Views: 332
Re: traits
Yeah, "doesn't work" isn't much to go on. I wonder if this will help (from a [unit] declaration): [modifications] [advancement] [effect] apply_to=new_ability [abilities] {ABILITY_NINJA} [/abilities] [/effect] [/advancement] [/modifications]
- April 15th, 2024, 1:22 pm
- Forum: WML Workshop
- Topic: [solved] [have_unit], count, recall list, WFL syntax and wildcards
- Replies: 4
- Views: 287
Re: [have_unit], count, recall list, WFL syntax and wildcards
Thanks. The WFL stuff looks quite useful, but I think I'll just stick to lua.
- April 15th, 2024, 6:58 am
- Forum: Lua Labs
- Topic: [closed] remove unit from array
- Replies: 11
- Views: 406
Re: remove unit from array
foreach doesn't play well with removing elements of the array it is iterating over. I don't try to remember the rules, I just use for if I'm going to remove anything.ZombieKnight wrote: ↑April 15th, 2024, 6:41 am Jup, [foreach] would work even better, but I want to learn lua better...
Thanks!
- April 15th, 2024, 6:52 am
- Forum: WML Workshop
- Topic: Next question: how to trigger a "sighted" event.
- Replies: 5
- Views: 297
Re: Next question: how to trigger a "sighted" event.
Actually, I made the assumption that any side != 1 is an enemy of side 1.
I have a hard time keeping the filter rules straight, I always have to look for an example, but something like this?
I have a hard time keeping the filter rules straight, I always have to look for an example, but something like this?
Code: Select all
[filter]
[enemy_of]
side=1
[/enemy_of]
[/filter]
[filter_second]
side=1
[/filter_second]
- April 15th, 2024, 2:48 am
- Forum: WML Workshop
- Topic: Setting multiple objectives
- Replies: 5
- Views: 138
Re: Setting multiple objectives
You can use die or last breath for when the enemy leader dies and capture for when a village is captured as triggers. Then when one of those things happens you just need to check if the other two conditions are met and if so [endlevel]. [have_unit] can test if the enemy leader is alive/dead. Checkin...
- April 14th, 2024, 6:50 pm
- Forum: WML Workshop
- Topic: [solved] [have_unit], count, recall list, WFL syntax and wildcards
- Replies: 4
- Views: 287
Re: [have_unit], count, recall list, WFL syntax and wildcards
Ah, hadn't seen that. Thanks.