• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Switching animation with attack type

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2007
Messages
920
I dunno what keywords to search so...
Is it possible, when u change hero's attack type (attacks enabled 1,2), to change animation with it, what i mean, hero has attacks (combat - attack 1 and combat - attack 2) , so i can set for 1st melee and for 2nd range, so how can i bind animations for each, like, for melee to be melee animation, dunno, like swing with sword, and for range to shot from his gun, that has in other hand, help anyone ? :p
 
Level 7
Joined
Dec 29, 2006
Messages
365
im not exactly sure what your asking... but from what i got out of your post your wondering how to tell your model to use 2 different attack types in ur animation???

if thats the case you need to make 2 notes and have the keys.

attack 1 is like this

Attack -1

that will be your first attack sequence

Attack -2 will be the 2nd

this tells the game engine to start this animation when the first one finishes.

i hope that answers what your asking... because i was a little confused on what u asked.
 

.KC

.KC

Level 8
Joined
Dec 10, 2007
Messages
118
Yes its possible. And Right now im working on a system that allows you to use onehands, twohands, duels, bows and crossbows as weapon. And the animation of the unit will change depend on which weapon you use.

With this script you can change a units animation tag. If you look at Illidan when he is morphed into a demon, you can see there stand "Alternate" in the animation names.

JASS:
call AddUnitAnimationProperties(unit,"Alternate",true)

Take a look of the model I uploaded, and look at the animation names.
I hope you understand me. Im not the best to english, so its very hard for me to explain.

Good luck
 

Attachments

  • Hero.mdx
    310.2 KB · Views: 94
Level 11
Joined
Jul 28, 2007
Messages
920
I think u enable this with spells. Lik add cleaving attack with no damage or stats yust the spell, that has animation names, like attack - 2 that will disable attack 1 and enable attack 2. I will download model now and look at it. Ty anyway. Your system could help me to, a lot.
 

.KC

.KC

Level 8
Joined
Dec 10, 2007
Messages
118
No you dont need any spell to do this. Only the script I showed to you. The system Im makingen is very complicated so it isnt finish the next 2 weeks.

Today I got birthday and I will hold a party for some friends. But if I got time tommorow, I will make a small sample system for you.
 

.KC

.KC

Level 8
Joined
Dec 10, 2007
Messages
118
Sorry for the late response... I did a small sample system for you, so you can see how it works. I wont descripe what every triggers do and so, I hope you have enough knowledge to understand my system. I made it in GUI.
I did this in 1 hour, so there may be some bugs, but I only made this so you can get an idea how animation tags work.

1. Select the unit
2. Open the spell book (Weapon Inventory)
3. Select a weapon you want to use
4. Try attack something.

You can see the animation swicth depends on what weapon you use. Also if you use a bow, the attack range will be increased.

Good Luck with it, and have fun:wwink:
 

Attachments

  • Combat System.w3x
    157.7 KB · Views: 61

.KC

.KC

Level 8
Joined
Dec 10, 2007
Messages
118
I dont know if you know the ability Chaos. Its an orc ability that morph the unit it another. It means it will replace the unit with another unit.

The answers you seek, are in my sample map. You can increase/decrease the attack range with the upgrade "Long Riffel". But since you can't decrease a level of an upgrade, its very limitied.

So the only way you can do it is creating 2 units. Lets say unit1 have 100 range, and unit2 have 700 range. When we want to increase the range from 100 to 700 we use the ability chaos to morph the unit1 into unit2. We simply add our custom chaos ability to unit1. Now our unit has morphed into unit2.

When we so want to decrease the range from 700 to 100 we add our second custom chaos ability to our unit2. Now the unit have morphed into unit1.

You can also use the methoed to switch between attack index 1 or 2.

I hope you understand this. Else I will try to descripe it better, but I dont got the time now, because I have to go too work.
Good Luck
 
Level 11
Joined
Jul 28, 2007
Messages
920
y i understand all clearly, in fact i didnt saw chaos morp ability :S, ever... y i saw all in map, all works fine, done some midifications, i will test it, but how morp affects on abilityes ? example:

uni1 has bash lvl 2, if unit2 has bash in object as ability, will be level of bash 4 unit2 also lvl 2 ? and if i add with trigger spell, i supose i need to add it again after unit morphs ? :), in other words, it affects on model and spells ?, doesnt affect, hp,mana,stats(only if they are not same in object unit1stats=unit2stats),items, ? =)
 

.KC

.KC

Level 8
Joined
Dec 10, 2007
Messages
118
Im not sure I understand what you mean. But I will try to explain what I understand.

The chaos ability got a lot of bugs. If you use it to morph a hero into another hero the damage and armor will be multiplyed. Acctualy I dont know all bugs that chaos have. When I use it and find a bug I try anything to avoid the bug. It could be removing an ability, buff, etc. before adding the chaos ability.

In the sample map, I need to remove the spellbook before adding the chaos ability, else the spellbook will be empty.

I know if you go to Game Constant and set the damage per strenght to null, the damage wont be multiplyed.

You can read a little bit of the chaos ability here:
http://hilton.vs.oiccam.com/showthread.php?t=81742
(This is another link to wc3campaign.net)
 
Status
Not open for further replies.
Top