Search found 1172 matches

by white_haired_uncle
Today, 6:07 pm
Forum: WML Workshop
Topic: [anitmation] conditionals
Replies: 1
Views: 37

[anitmation] conditionals

I'm creating a unit, the suicide drone. It has a weapon special 'explosive detonation' whereby if it hits it explodes doing self.hitpoints to himself and all adjacent units. It also has trait 'unstable', so if you hit it with impact, again an Earth-shattering kaboom! Kind of a fun little guy. This a...
by white_haired_uncle
Today, 5:43 pm
Forum: Lua Labs
Topic: glitchy add_hex_overlay animation
Replies: 7
Views: 133

Re: glitchy add_hex_overlay animation

I have no idea, but that animation is perfect for something else I'm working on. Thanks!
by white_haired_uncle
Today, 4:42 pm
Forum: Lua Labs
Topic: [GUI] selecting multipage
Replies: 0
Views: 20

[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...
by white_haired_uncle
Today, 3:21 am
Forum: Lua Labs
Topic: [GUI] various questions on lining stuff up
Replies: 1
Views: 2605

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...
by white_haired_uncle
Yesterday, 1:05 pm
Forum: WML Workshop
Topic: result of conditional with invalid qualifier
Replies: 2
Views: 86

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...
by white_haired_uncle
Yesterday, 12:23 pm
Forum: WML Workshop
Topic: traits
Replies: 15
Views: 335

Re: traits

by white_haired_uncle
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: 278

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...
by white_haired_uncle
Yesterday, 3:00 am
Forum: Lua Labs
Topic: Custom dialog placement
Replies: 12
Views: 236

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.
by white_haired_uncle
April 16th, 2024, 4:38 pm
Forum: WML Workshop
Topic: Terrain - cave path, castle overlay, lit
Replies: 3
Views: 121

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?
by white_haired_uncle
April 16th, 2024, 4:22 pm
Forum: WML Workshop
Topic: Filter weapon special in attack_anim
Replies: 1
Views: 83

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 (...
by white_haired_uncle
April 16th, 2024, 2:37 am
Forum: WML Workshop
Topic: traits
Replies: 15
Views: 335

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]
by white_haired_uncle
April 15th, 2024, 1:22 pm
Forum: WML Workshop
Topic: [solved] [have_unit], count, recall list, WFL syntax and wildcards
Replies: 4
Views: 298

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.
by white_haired_uncle
April 15th, 2024, 6:58 am
Forum: Lua Labs
Topic: [closed] remove unit from array
Replies: 11
Views: 416

Re: remove unit from array

ZombieKnight wrote: April 15th, 2024, 6:41 am Jup, [foreach] would work even better, but I want to learn lua better...
Thanks!
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.
by white_haired_uncle
April 15th, 2024, 6:52 am
Forum: WML Workshop
Topic: Next question: how to trigger a "sighted" event.
Replies: 5
Views: 316

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?

Code: Select all

[filter]
   [enemy_of]
        side=1
   [/enemy_of]
[/filter]
[filter_second]
    side=1
[/filter_second]