Search found 1169 matches

by white_haired_uncle
Today, 3:21 am
Forum: Lua Labs
Topic: [GUI] various questions on lining stuff up
Replies: 1
Views: 2509

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: 64

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: 315

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: 269

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: 11
Views: 199

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: 107

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: 76

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: 315

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: 258

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: 371

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: 262

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]
by white_haired_uncle
April 15th, 2024, 2:48 am
Forum: WML Workshop
Topic: Setting multiple objectives
Replies: 5
Views: 136

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

[solved] [have_unit], count, recall list, WFL syntax and wildcards

I want to print a message only if the number of undead, both on the map and on the recall list. This has led me to some questions. So many it's time to ask for help. (I know, use lua. But I want to learn some stuff) [message] speaker=Efraim message= _ "Good point. Perhaps we should have brought...