Cold Mage (Unit animation problem SOLVED)
Moderator: Forum Moderators
Forum rules
Before posting critique in this forum, you must read the following thread:
Before posting critique in this forum, you must read the following thread:
Cold Mage (Unit animation problem SOLVED)
I am not sure if this should go on the WML Workshop forum
I was toying with the idea of making a campaign; and i tried to make new units to see if i am capable of it. But i am too bad as artist (totally unable to make a 3D impression on pixels, hehe). But i think i am able to modify existing units and/or frankenpack a little bit.
Well, i was doing a Dark Sorcerer variation called Cold Mage (more hitpoints, better melee attack that freezes (slows), doesn't level up). And i have made all the animations for it, but i have a problem with it.
When the Cold Mage hits the enemy with its melee attack, i want to show a magical twister coming from his staff. The problem is that then, the Mage moves very little towards the enemy (i guess it is due to the extra frames). Is there any way to solve this?
The unit attack WML looks like this right now:
Here, i attach the picture of my mage.
BTW, do we have a storm/snow sound file in stock somewhere?
I was toying with the idea of making a campaign; and i tried to make new units to see if i am capable of it. But i am too bad as artist (totally unable to make a 3D impression on pixels, hehe). But i think i am able to modify existing units and/or frankenpack a little bit.
Well, i was doing a Dark Sorcerer variation called Cold Mage (more hitpoints, better melee attack that freezes (slows), doesn't level up). And i have made all the animations for it, but i have a problem with it.
When the Cold Mage hits the enemy with its melee attack, i want to show a magical twister coming from his staff. The problem is that then, the Mage moves very little towards the enemy (i guess it is due to the extra frames). Is there any way to solve this?
The unit attack WML looks like this right now:
Code: Select all
[attack_anim]
[filter_attack]
range=melee
[/filter_attack]
[frame]
begin=-250
end=-200
image="units/undead-necromancers/coldmage.png"
[/frame]
[frame]
begin=-200
end=-100
image="units/undead-necromancers/coldmage-attack-staff-1.png"
[/frame]
[if]
hits=yes
[frame]
begin=-100
end=100
image="units/undead-necromancers/coldmage-attack-staff-2.png"
sound=staff.wav
[/frame]
[missile_frame]
begin=-100
end=-50
halo="halo/cold-twister-1.png"
offset=1.0
[/missile_frame]
[missile_frame]
begin==-50
end=0
halo="halo/cold-twister-2.png"
offset=1.0
[/missile_frame]
[missile_frame]
begin=0
end=50
halo="halo/cold-twister-3.png"
offset=1.0
[/missile_frame]
[missile_frame]
begin=50
end=120
halo="halo/cold-twister-4.png"
offset=1.0
[/missile_frame]
[missile_frame]
begin=120
end=190
halo="halo/cold-twister-5.png"
offset=1.0
[/missile_frame]
[missile_frame]
begin=190
end=240
halo="halo/cold-twister-6.png"
offset=1.0
[/missile_frame]
[missile_frame]
begin=240
end=290
halo="halo/cold-twister-7.png"
offset=1.0
[/missile_frame]
[/if]
[else]
hits=no
[frame]
begin=-100
end=100
image="units/undead-necromancers/coldmage-attack-staff-2.png"
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[frame]
begin=100
end=175
image="units/undead-necromancers/coldmage-magic-1.png"
[/frame]
[frame]
begin=175
end=250
image="units/undead-necromancers/coldmage.png"
[/frame]
[/attack_anim]
BTW, do we have a storm/snow sound file in stock somewhere?
- Attachments
-
- coldmage.png (3.85 KiB) Viewed 3172 times
Last edited by iserp on April 7th, 2010, 12:40 pm, edited 1 time in total.
- artisticdude
- Moderator Emeritus
- Posts: 2424
- Joined: December 15th, 2009, 12:37 pm
- Location: Somewhere in the middle of everything
Re: Unit animation problem
The WML workshop would probably be the best place for this, since you're looking for help with the unit coding.
If you want him to stay in one place during the attack, you'll want this:
Melee attacks don't have missile frames, since what would be the point of firing a missle when you're right next to the enemy and can hit him with your fist/stick/sword/etc.?
If you want him to stay in one place during the attack, you'll want this:
Code: Select all
[filter_attack]
range=ranged
[/filter_attack]
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
Re: Unit animation problem
It is indeed a melee attack.
About the "missile frame", well... i copied that from the Mage of Light ranged attack, and i didn't check what happens if you use normal frames.
Ok, i tried now with normal frames: it moves towards the enemy as i wanted, but now, the problem is that the guy disappears for some time while the twister is on.... mmm, i'll try a bit more to see what happens.
EDIT: a Mod could move this to WML workshop if it is better...
About the "missile frame", well... i copied that from the Mage of Light ranged attack, and i didn't check what happens if you use normal frames.
Ok, i tried now with normal frames: it moves towards the enemy as i wanted, but now, the problem is that the guy disappears for some time while the twister is on.... mmm, i'll try a bit more to see what happens.
EDIT: a Mod could move this to WML workshop if it is better...
Re: Unit animation problem
In the end, i got a workaround.
I used the missile frames, and i used the offset tag in the normal frames to move the unit towards the enemy; it is not as smooth as the normal attack, but it is not bad. I will post my unit when i have an appropiate sound for the attack, in case anyone finds it useful.
I used the missile frames, and i used the offset tag in the normal frames to move the unit towards the enemy; it is not as smooth as the normal attack, but it is not bad. I will post my unit when i have an appropiate sound for the attack, in case anyone finds it useful.
- Speedbrain
- Posts: 137
- Joined: August 10th, 2009, 9:51 pm
- Location: Utah, USA
Re: Unit animation problem
don't worry, TSI will be along before long. He will decide whether to move it or not.iserp wrote:a Mod could move this to WML workshop if it is better...
I like the base frame of that mage, though. Looks real good.
If you want critiques on the animation, you could post a .gif of it here, or .pngs for people to look at.
Re: Unit animation problem
ok, this is an issue with the way the animtion logic guesses if an attack is melee or ranged (which is not as trivial as it seems)
basically, if a [missile_frame] block exists, it considers it as a ranged attack.
a way to work around this is to set the offset= yourself. I don't remember what the offset is set by the engine (0~0.7:0.7~0 iirc) and if the magic missile itself has a separate offset
it's all documented on the AnimationWML page, though...
basically, if a [missile_frame] block exists, it considers it as a ranged attack.
a way to work around this is to set the offset= yourself. I don't remember what the offset is set by the engine (0~0.7:0.7~0 iirc) and if the magic missile itself has a separate offset
it's all documented on the AnimationWML page, though...
Fight key loggers: write some perl using vim
Re: Unit animation problem
Ah, boucman beat me to it, here's the exact quote though:
AnimationWML wrote:* [attack_anim] is an animation with the following parameters automatically set
if the animation contains a missile frameelseCode: Select all
apply_to=attack missile_offset="0~0.8"
Code: Select all
apply_to=attack offset="0~0.6,0.6~0"
Re: Unit animation problem
Thank you!
This,
was exactly what i needed
Ok, here are the animations. I just did the same changes to the frames of Dark Sorcerer, i wasn't sure what to add to make it feel more different (and in the realm of my possibilities, hehe). And also a directory with everything, i am not sure how you use to upload it, i tried to keep the directories as they should be placed.
This,
Code: Select all
apply_to=attack
offset="0~0.6,0.6~0"
Ok, here are the animations. I just did the same changes to the frames of Dark Sorcerer, i wasn't sure what to add to make it feel more different (and in the realm of my possibilities, hehe). And also a directory with everything, i am not sure how you use to upload it, i tried to keep the directories as they should be placed.
- Attachments
-
- Cold Mage_1.tar.gz
- (83.55 KiB) Downloaded 169 times
-
- cold-twister.gif (4.16 KiB) Viewed 3043 times
-
- coldmage3.gif (10.5 KiB) Viewed 3043 times
-
- coldmage2.gif (4.19 KiB) Viewed 3043 times
Re: Cold Mage (Unit animation problem SOLVED)
I would suggest making his lower body a little more dynamic in the 'casting' animation.