Problem with an added attack

The place to post your WML questions and answers.

Moderator: Forum Moderators

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.
Post Reply
User avatar
Lehor
Posts: 17
Joined: January 8th, 2013, 6:22 pm

Problem with an added attack

Post by Lehor »

Hello,

I've got a problem with an attack I added to a level 2 for Nixie from Ageless Era.
The animation of my added attack "Water Entangling" is this:

[attack_anim]
[filter_attack]
name=water entangling
[/filter_attack]
[missile_frame]
begin=-250
end=0
image=projectiles/water-entangling.png
image_diagonal="projectiles/water-entangling.png"
[/missile_frame]
{SOUND:SLOW}
[frame]
begin=-300
end=-150
image=units/yokai/nixie-mistress.png
halo=halo/water-entangling-1.png:150
[/frame]
[frame]
begin=-150
end=0
image=units/yokai/nixie-mistress.png
halo=halo/water-entangling-2.png:150
sound=entangle.wav
[/frame]
[frame]
begin=0
end=150
image=units/yokai/nixie-mistress.png
halo=halo/water-entangling-3.png:150
[/frame]
[frame]
begin=150
end=300
image=units/yokai/nixie-mistress.png
halo=halo/water-entangling-4.png:150
[frame]
begin=150
end=300
image=units/yokai/nixie-mistress.png
halo=halo/water-entangling-5.png:150
[/frame]
[/attack_anim]
[/unit_type]

Somehow it says there was a wrong closing tag.
What did I do wrong?

Greetings Lehor
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Problem with an added attack

Post by Pentarctagon »

Moved to the WML Workshop, since this is about WML.

Also, if you are going to ask many questions, please make a single thread for them.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: Problem with an added attack

Post by lipk »

You missed a [/frame] tag in the attack anim. I'll let you find where :P
User avatar
Lehor
Posts: 17
Joined: January 8th, 2013, 6:22 pm

Re: Problem with an added attack

Post by Lehor »

Okay I found it :D.
Yes, if I see there're multiple topics which need to be discussed I'll put them together.

Greetings Lehor
User avatar
Lehor
Posts: 17
Joined: January 8th, 2013, 6:22 pm

Re: Problem with an added attack

Post by Lehor »

Actually the attack now appears on Nixie Mistress herself, what would I have to change?

Greetings Lehor
User avatar
Lehor
Posts: 17
Joined: January 8th, 2013, 6:22 pm

Re: Problem with an added attack

Post by Lehor »

I also have another problem with an added attack (snow assault, the last one) for a level 3 of Faerie from Ageless Era:

Code: Select all

[unit_type]
    id=High Faerie of Snow
    name= _ "High Faerie of Snow"
    race=AE_yokai_obake
    gender=female
    image="units/yokai/high-faerie-of-snow.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    ellipse="misc/ellipse"
    hitpoints=58
    movement_type=pixie
    movement=8
    experience=100
    level=3
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=16
    usage=scout
    description= _ "This unit is from the Yokai faction. It's coding and art were done by Melon."
    {DEFENSE_ANIM "units/yokai/high-faerie-of-snow.png" "units/yokai/high-faerie-of-snow.png" {SOUND_LIST:ELF_FEMALE_HIT} }
    die_sound={SOUND_LIST:ELF_FEMALE_DIE}

    [traits]
        {TRAIT_DEXTROUS}
    [/traits]

    [attack]
        name=touch
        description= _ "freezing touch"
        icon=attacks/touch-faerie.png
        type=cold
        range=melee
        damage=6
        number=4
    [/attack]
    [attack]
        name=dust of spray
        description= _ "freezing spray"
        icon=attacks/iceball.png
        type=cold
        range=ranged
        damage=13
        number=3
    [/attack]
    [attack]
        name=snow assault
        description= _ "snow assault"
        icon=attacks/snow-assault.png
        type=cold
        range=ranged
        damage=10
        number=5
        [specials]
            {WEAPON_SPECIAL_SLOW}
            {WEAPON_SPECIAL_CLEAVE (snow assault}
        [/specials]
            {WEAPON_SPECIAL_CLEAVE_EVENT (snow assault)}
    [/attack]
    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        [frame]
            begin=-150
            end=150
            image="units/yokai/high-faerie-of-snow.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spray
        [/filter_attack]

        {MISSILE_FRAME_ICE}
        [frame]
            begin=-50

            end=0

            sound=magicmissile.wav
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=snow assault
        [/filter_attack]

        [missile_frame]
            begin=150
            end=150
            image="projectiles/snow-assault-1.png"
            image_diagonal="projectiles/snow-assault-1.png"
        [/missile_frame]

        [missile_frame]
            begin=150
            end=150
            image="projectiles/snow-assault-2.png"
            image_diagonal="projectiles/snow-assault-2.png"
        [/missile_frame]

        [missile_frame]
            begin=150
            end=150
            image="projectiles/snow-assault-3.png"
            image_diagonal="projectiles/snow-assault-3.png"
        [/missile_frame]

        [missile_frame]
            begin=150
            end=150
            image="projectiles/snow-assault-4.png"
            image_diagonal="projectiles/snow-assault-4.png"
        [/missile_frame]

        [if]
            hits=no
            [frame]
                begin=-50
                end=0
                image="units/yokai/high-faerie-of-snow.png"
                sound=magicmissile.wav
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-50
                end=0
                image="units/yokai/high-faerie-of-snow.png"
                sound=magicmissile.wav
            [/frame]
        [/else]
    [/attack_anim]
[/unit_type]
It says that the macro argument is not terminated. What should that mean?

Thank you for your answers!

Greetings Lehor
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Problem with an added attack

Post by JaMiT »

Lehor wrote:It says that the macro argument is not terminated. What should that mean?
It means that one of the arguments to one of your macros is not terminated.

Macro: The things inside curly braces, {LIKE THIS}.

Argument: The things you supply after the macro's name. At their simplest, they are separated from each other by spaces, but this kind of argument is always terminated (by either a space or the end of the macro). More complex arguments are delimited by parentheses or quotes, and these can be unterminated if the ending character is missing (since these are only terminated by the corresponding ending character, not by the end of the macro).

So you should search your file for macros (I find that searching for an opening curly brace works well), and check each argument. If you see something with un- or mis- matched parentheses -- like "{WEAPON_SPECIAL_CLEAVE (snow assault}" -- then that is probably where your problem lies.
User avatar
Lehor
Posts: 17
Joined: January 8th, 2013, 6:22 pm

Re: Problem with an added attack

Post by Lehor »

Thank you.

But occasionally, water entangling from Nixie Mistress actually always appears on herself.

Code: Select all

[unit_type]
    id=Nixie Mistress
    name= _ "Nixie Mistress"
    race=AE_yokai_obake
    gender=female
    image="units/yokai/nixie-mistress.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    ellipse="misc/ellipse"
    hitpoints=40
    movement_type=nixie
    movement=6
    experience=100
    level=2
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=16
    usage=scout
    description= _ "This unit is from the Yokai faction. It's coding and art were done by Melon."
    {DEFENSE_ANIM "units/yokai/nixie.png" "units/yokai/nixie-mistress.png" {SOUND_LIST:ELF_FEMALE_HIT} }
    die_sound={SOUND_LIST:ELF_FEMALE_DIE}

    [traits]
        {TRAIT_DEXTROUS}
    [/traits]

    [attack]
        name=touch
        description= _ "freezing touch"
        icon=attacks/touch-faerie.png
        type=cold
        range=melee
        damage=5
        number=3
    [/attack]
    [attack]
        name=spray
        description= _ "water spray"
        icon=attacks/waterspray.png
        type=impact
        range=ranged
        damage=7
        number=4
    [/attack]
    [attack]
        name=water entangling
        description= _ "water entangling"
        icon=attacks/water-entangling.png
        type=impact
        range=ranged
        damage=11
        number=2
        [specials]
            {WEAPON_SPECIAL_SLOW}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        [frame]
            begin=-150
            end=150
            image="units/yokai/nixie-mistress.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spray
        [/filter_attack]

        [missile_frame]
            begin=-165

            end=0

            image="projectiles/water-spray.png"

            image_diagonal="projectiles/water-spray.png"
        [/missile_frame]
        [frame]
            begin=-50

            end=0

            sound=water-blast.wav
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=water entangling
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image=projectiles/water-entangling.png
            image_diagonal="projectiles/water-entangling.png"
        [/missile_frame]
        {SOUND:SLOW}
        [frame]
            begin=-300
            end=-150
            image=units/yokai/nixie-mistress.png
            halo=halo/water-entangling-1.png:150
        [/frame]
        [frame]
            begin=-150
            end=0
            image=units/yokai/nixie-mistress.png
            halo=halo/water-entangling-2.png:150
            sound=entangle.wav
        [/frame]
        [frame]
            begin=0
            end=150
            image=units/yokai/nixie-mistress.png
            halo=halo/water-entangling-3.png:150
        [/frame]
        [frame]
            begin=150
            end=300
            image=units/yokai/nixie-mistress.png
            halo=halo/water-entangling-4.png:150
        [/frame]
        [frame]
            begin=150
            end=300
            image=units/yokai/nixie-mistress.png
            halo=halo/water-entangling-5.png:150
        [/frame]
    [/attack_anim]
[/unit_type]
How would I have to change the coordinates for it to appear on the target?
Post Reply