Special attack animation question

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.
Post Reply
Adiray
Posts: 2
Joined: May 10th, 2018, 1:05 pm

Special attack animation question

Post by Adiray » May 15th, 2018, 8:22 pm

Greetings everyone,

I'm having some trouble with, as the title suggests, animating the melee attack for my unit. I also want to say that i just very recently started using WML so i'm not that good with it, thanks for the understanding, and sorry if my question is really dumb :lol:
The animation is 1) Arm on the side 2) Summoning the sword 3) Sword summoned 4) Swings the sword (that I have to do yet in detail)
I have 14 frames of the summoning and i wanted to do 3-4 for the swing, but that's not the issue. What I wanted is to have my unit stand still when it summons the sword and only when it is done to have him move forward to attack. However if I do it this way

Code: Select all

[attack_anim]
    	[filter_attack]
            name=Aiguille
        [/filter_attack]
        
        	start_time=-300
        [frame]
        	image="units/Douziens/Xelor-attack-[1~13,base].png:250"
        [/frame]
        [frame]
        	image="units/Douziens/Xelor-3.png:75"
        [/frame]
    [/attack_anim]
the unit starts moving forward as soon as it starts summoning his weapon, and that's not what I want. I thought of doing something more like this

Code: Select all

[pre_movement_anim]
     [frame]
            image="units/Douziens/Xelor-mov-[1,2,3,4].png:50"
            halo="halo/Xelor_Teleportation/Xelor-teleportation-[1~7].png:28"
        [/frame]
    [/pre_movement_anim]
    [post_movement_anim]
        [frame]
            image="units/Douziens/Xelor-mov-[4,3,2,1].png:50"
            halo="halo/Xelor_Teleportation/Xelor-teleportation-[7~1].png:28"
        [/frame]
    [/post_movement_anim]
    [movement_anim]
        [frame]
            image="units/Douziens/Xelor-mov-base.png"
        [/frame]
    [/movement_anim]
where there is a separate animation before, during, and after the movement (except here it would be before the attack)
Thank you in advance if you can provide me with an explanation or a solution, and again, sorry if it's a really dumb question :oops:
Attachments
Xelor-attack-1.png
Xelor-attack-1.png (4.12 KiB) Viewed 94 times
Xelor-attack-7.png
Xelor-attack-7.png (4.23 KiB) Viewed 94 times
Xelor-attack-base.png
Xelor-attack-base.png (4.27 KiB) Viewed 94 times

User avatar
beetlenaut
Developer
Posts: 2165
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Special attack animation question

Post by beetlenaut » May 16th, 2018, 1:41 pm

Adiray wrote:
May 15th, 2018, 8:22 pm
there is a separate animation before, during, and after the movement (except here it would be before the attack)
Those exist. They are called draw_weapon and sheath_weapon.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

Adiray
Posts: 2
Joined: May 10th, 2018, 1:05 pm

Re: Special attack animation question

Post by Adiray » May 16th, 2018, 2:46 pm

Thanks a lot, just did that. Works like a charm !

Post Reply