help for add-ons

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.
User avatar
MoonyDragon
Posts: 85
Joined: November 29th, 2017, 5:46 pm

Re: help for add-ons

Post by MoonyDragon »

It would be of great help if you specified what your code is supposed to do. As far as I understand, it's an event belonging to an attack that deals damage to multiple units around the defender. Well, I'll try to code that...

EDIT: I reworked the code, which actually did nothing at all. it should work now as intended.

Code: Select all

[event]
    name=attacker hits
    first_time_only=no

    [filter_weapon]
        special= # your custom weapon special
    [/filter_weapon]

    [harm_unit]
        [filter]
            [filter_adjacent]
                x,y=$x2,$y2
                is_enemy=no
            [/filter_adjacent]
        [/filter]
        
        [filter_second]
            x,y=$x1,$y1
        [/filter_second]
        
        amount=$weapon.damage
        damage_type=$weapon.type
        animate=yes
    [/harm_unit]
[/event]

[event]
    name=defender hits
    first_time_only=no

    [filter_weapon]
        special= # your custom weapon special
    [/filter_weapon]

    [harm_unit]
        [filter]
            [filter_adjacent]
                x,y=$x1,$y1
                is_enemy=no
            [/filter_adjacent]
        [/filter]
        
        [filter_second]
            x,y=$x2,$y2
        [/filter_second]
        
        amount=$second_weapon.damage
        damage_type=$second_weapon.type
        animate=yes
    [/harm_unit]
[/event]
Last edited by MoonyDragon on April 13th, 2020, 8:58 pm, edited 1 time in total.
Default L0 Era - Level 1 leaders with level 0 recruits!
User avatar
zijing
Posts: 21
Joined: January 18th, 2020, 11:23 am

Re: help for add-ons

Post by zijing »

Oh,also the <b>Droid Menu</b> designed by enclave,it sometimes work,sometimes didn't.In a campaign,in some scenario it works properly,but with the pango markup error:

Code: Select all

<span color='nil'>Undroid jing side 1</span>
<span color='nil'>Undroid jing side 2</span>
Only shows properly with green and purple.I lazy to paste code,so can anyone just download yourself andhelp metofind the problem...?Thanks.
Post Reply