How to make spellcasting animation accure while attacking?

Sayiain

You can change this now in User CP.
Reaction score
0
Every unit has some animations. Standing, looking around, running, dying, hitting/shooting, casting and some typical for every like bear sits or Mountain King plays with his hammer.

How to make for example Mountain King attack with his cough/scream?
 

inevit4ble

Well-Known Member
Reaction score
38
You must trigger it so when Unit is attacked, attacking unit == mountain king, then Animation - Play X Animation
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I don't think it's possible to play any animation other than Attack animations when attacking. You might be able to replace the Attack command with a spell, then trigger the animation though.
 

Sayiain

You can change this now in User CP.
Reaction score
0
You must trigger it so when Unit is attacked, attacking unit == mountain king, then Animation - Play X Animation
YES YES YES!
It works!!!!
Yay!
 

Sayiain

You can change this now in User CP.
Reaction score
0
The problem I have now is the moment of the sound of hit.
|---------------| <-this is time of animation
| H | <-Here the animation Hits the target.
| S | <-Here is the Sound of the hit.

How to change the moment of the sound?
The sound is not the sound of weapon. I set no sound of weapon.
 

inevit4ble

Well-Known Member
Reaction score
38
in the same trigger as the animation, you add "Play Sound" and add the right sound

not sure if it overwrites the original sound otherwise you need to set the attack sound in the object editor to null.
Of course then if you want to do this for multiple units you will have to check which unit because the attack types have different sounds.
 

Smitty

Member
Reaction score
20
If the unit is ranged it will be more difficult to do since you want the sound of te hit to play as the missile hits the target, which would be more difficult to do since the time taken by the misseipe to reach the target will not always be the same.
I guess if you wanted to make it perfect you could use a damage detector (weep made an awesome one) and set the trigger to play the hit sound at the point at which the targeted unit actually takes damage (using conditions the check that the damaging unit is equal to mountain king and that he didn't deal the damage using a spell).

However if your hero is melee, then none if what I said matters and you can probably just apply a fixed wait time (the animation backswing time) between playing the attack sound and the hit sound :)
 

inevit4ble

Well-Known Member
Reaction score
38
Well, with range it depends. You might want the sound of the missile being shot and it hitting the target maybe.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
if you are using a damage system you can have it whenever a unit takes damage if the damage source is Xunit and castboolean is false then play sound
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top