Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How do I make attack animation


gu3mb3l
 Share

Recommended Posts

Under Sub OnAttack(index, Damage)

Put: Call SpellAnim(SpellNum, GetPlayerMap(Target), GetPlayerX(Target), GetPlayerY(Target))

You might want to do the same for OnArrowHit(index, Damage) And PlayerHit(index, Damage) as well

Example of it would be:

Sub OnAttack(Index, Damage)
Dim Target

If Int(Damage) > 0 Then
If Int(GetPlayerTarget(Index)) > 0 Then
Target = GetPlayerTarget(Index)
                        Call SpellAnim(35, GetPlayerMap(Target), GetPlayerX(Target), GetPlayerY(Target))
Call DamagePlayer(Index, Target, Damage)
Else
Target = GetPlayerTargetNPC(Index)
                        Call SpellAnim(34, GetPlayerMap(index), GetNPCX(GetPlayerMap(index), Target), GetNPCY(GetPlayerMap(index), Target))
Call DamageNPC(Index, Target, Damage)
End If
End If
End Sub
Link to comment
Share on other sites

@gu3mb3l:

> Do I must make spell with id number 35 or 34 and when I attack a NPC the spell animation will appear?? :huh:. Sorry my bad English ;)

No, Ithink you will have to see what spell graphic is number 35 (in your Spells.bmp, in the client folder, in the graphic folder).  The number corresponds to the row (eg, the second row, would be animation#2)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...