Search found 282 matches

by ZombieKnight
Today, 1:25 pm
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

He said that get/find doesn't work. The only thing that worked was setting the facing direction manually on the unit before animating. However, that same code also passes the facing direction as the target, which doesn't seem like it could work. True, it doesn't work without manually setting facing...
by ZombieKnight
Today, 12:55 pm
Forum: Lua Labs
Topic: Combat Animation
Replies: 2
Views: 55

Re: Combat Animation

Celtic_Minstrel wrote: Today, 12:48 pm That seems like something that might not be possible, unless the slide automatically occurs any time you set health.
It doesn't...

But maybe harm_unit does that?
by ZombieKnight
Today, 12:29 pm
Forum: Lua Labs
Topic: Combat Animation
Replies: 2
Views: 55

Combat Animation

Hi,
How to animate my "combat" (abilities) same way the real combat is animated (with that sliding health decrease)?
Thanks
by ZombieKnight
Today, 5:25 am
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

The documentation is here for the record. Hmm. I think we can tell that the wiki is wrong and it should be "target", not "facing" from src/scripting/game_lua_kernel.cpp. And it appears target= needs a location, but I can't find a solid definition of location. It should accept &q...
by ZombieKnight
Yesterday, 3:49 pm
Forum: Faction & Era Development
Topic: The Great Steppe Era (1.16,1.18 add-on server)
Replies: 150
Views: 119530

Re: The Great Steppe Era (1.16,1.18 add-on server)

Hiii, I'm "inspiring" by some of your abilities. And I've noticed Ability AWE (in abilities_misc) is setup wrongly You add a negative value, rather than sub positive value, resulting in the lower level of ability winning over a stronger one (If you have a lvl0 unit adjacent to lvl1 and lvl...
by ZombieKnight
Yesterday, 11:29 am
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

white_haired_uncle wrote: Yesterday, 11:21 am Did/could you try this:

Code: Select all

animation:add(attacker, "attack", "miss",{with_bars = false, primary = attacker.attacks[v["attacker_stats.name"]], secondary = attacker.attacks[v["attacker_stats.name"]], target = wesnoth.map.find{x = 17, y = 30}[1])
Doesn't work
by ZombieKnight
Yesterday, 10:53 am
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

Got it!!! Got to dig inside WML tag implementation to find it. Now it's clear animation:add() DOESN'T take facing as a parameter, but target. The whole doc of the animation:add should be added (where to contact someone who can edit docs?) My Working code: local facing = {x = 17, y = 30} local unit =...
by ZombieKnight
Yesterday, 10:13 am
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

white_haired_uncle wrote: June 1st, 2024, 4:31 pm Try "target" instead of "facing", and probably use { x = X, y = Y }.
Like this target = {x=19,y=28}?
Doesn't work
by ZombieKnight
June 1st, 2024, 7:08 pm
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

Thanks, I'll try tommorrow!
(sry for delay, internet wasn't really working today)
by ZombieKnight
June 1st, 2024, 3:47 pm
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

Try the name of a direction, for example facing = 'nw' . It doesn't work for me :( ... animation:add(attacker, "attack", "miss",{with_bars = false, primary = attacker.attacks[v["attacker_stats.name"]], secondary = attacker.attacks[v["attacker_stats.name"]],fa...
by ZombieKnight
May 31st, 2024, 3:30 pm
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

Is this not enough? animator:add(unit, flag, hits, { facing = {x = 3, y = 12} }) No, this code doesn't work (playies animation, but doesn't care what is in facing) animation:add(attacker, "attack", "miss",{with_bars = false, primary = attacker.attacks[v["attacker_stats.name...
by ZombieKnight
May 31st, 2024, 11:29 am
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Re: Lua location syntax

Thanks ^^
I couldn't find the right syntax.
by ZombieKnight
May 31st, 2024, 5:35 am
Forum: Lua Labs
Topic: Lua location syntax
Replies: 17
Views: 474

Lua location syntax

Hi
how to set facing in animation:add?
https://wiki.wesnoth.org/LuaAPI/wesnoth ... e_animator
(I'd like unit to face x,y)

Code: Select all

... , facing = ???
by ZombieKnight
May 29th, 2024, 7:30 pm
Forum: Lua Labs
Topic: [solved] Fight between units
Replies: 2
Views: 124

Re: Fight between units

Good!
I've animated it using harm_unit and create_animation already, but I kimda thought I can't do that,
Thanks
by ZombieKnight
May 29th, 2024, 6:07 pm
Forum: Lua Labs
Topic: [solved] Fight between units
Replies: 2
Views: 124

[solved] Fight between units

Hey,
how to make a fight between units using Lua/WML?
Thanks