Range attack is using melee attack animation
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.
Range attack is using melee attack animation
I don't know why but my Healer Saurian moves toward the enemy when he use his range attack.
He has two attack, melee and range:
Also he has two animations:
I am not sure why I am having this error. Could someone please help me?
He has two attack, melee and range:
Code: Select all
[attack]
name=staff
description= _ "staff"
icon="attacks/staff-magic.png"
type=impact
range=melee
damage=4
number=2
[/attack]
[attack]
name=missile
description=_"missile"
icon=attacks/magic-missile.png
type=fire
range=ranged
[specials]
{WEAPON_SPECIAL_MAGICAL}
[/specials]
damage=6
number=2
[/attack]
Code: Select all
[attack_anim]
[filter_attack]
name=staff
[/filter_attack]
offset=0.0~0.3,0.3~0.45,0.45~0.3,0.3~0.0
start_time=-250
[frame]
duration=150
image="units/saurians/healer-melee-1.png"
[/frame]
[if]
hits=yes
[frame]
duration=100
image="units/saurians/healer-melee-2.png"
sound=staff.wav
[/frame]
[/if]
[else]
hits=no
[frame]
duration=100
image="units/saurians/healer-melee-2.png"
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[frame]
duration=100
image="units/saurians/healer-melee-3.png"
[/frame]
[frame]
duration=90
image="units/saurians/healer-melee-4.png"
[/frame]
[frame]
duration=80
image="units/saurians/healer-melee-5.png"
[/frame]
[frame]
duration=50
image="units/saurians/healer-defend-1.png"
[/frame]
[/attack_anim]
[attack_anim]
[filter_attack]
name=missile
[/filter_attack]
{MAGIC_MISSILE 11 -20}
{HALO_FRAME_SAURIAN}
start_time=-300
[frame]
duration=50
image="units/saurians/healer-magic-1.png"
halo="halo/saurian-magic-halo-1.png"
[/frame]
[frame]
duration=60
image="units/saurians/healer-magic-1.png"
halo="halo/saurian-magic-halo-2.png"
sound=magicmissile.wav
[/frame]
[frame]
duration=70
image="units/saurians/healer-magic-2.png"
halo="halo/saurian-magic-halo-3.png"
[/frame]
[frame]
duration=80
image="units/saurians/healer-magic-2.png"
halo="halo/saurian-magic-halo-4.png"
[/frame]
[frame]
duration=90
image="units/saurians/healer-magic-2.png"
halo="halo/saurian-magic-halo-5.png"
[/frame]
[frame]
duration=100
image="units/saurians/healer.png"
halo="halo/saurian-magic-halo-6.png"
[/frame]
[frame]
duration=100
image="units/saurians/healer.png"
halo="halo/saurian-magic-halo-7.png"
[/frame]
[/attack_anim]
- ForestDragon
- Posts: 1770
- Joined: March 6th, 2014, 1:32 pm
- Location: Ukraine
Re: Range attack is using melee attack animation
you can put "offset=0" inside [frame]s in the ranged animation.
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
Re: Range attack is using melee attack animation
Thanks it works. So [frame] has already a default offset?
- ForestDragon
- Posts: 1770
- Joined: March 6th, 2014, 1:32 pm
- Location: Ukraine
Re: Range attack is using melee attack animation
yes. though If there is a [missile_frame] present, the default offset is 0 (offset= value in [frame] still has the higher priority for the animation, though)Enderlook wrote:Thanks it works. So [frame] has already a default offset?
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
Re: Range attack is using melee attack animation
Ok, thanks.