Animation on Player

Hey guys, i want to animation on my player when it is 16 level.I tried everything but nothing happened.

Code;

ModPlayer


Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 3)

Call SetPlayerExp(index, expRollover)

Select Case GetPlayerLevel(index)

Case 16

If GetPlayerClass(index) = 1 Then

SetPlayerClass index, 6

SetPlayerSprite index, 2

SetPlayerStat index, Strength, GetPlayerStat(index, Strength) + 10

SetPlayerStat index, Endurance, GetPlayerStat(index, Endurance) + 10

SetPlayerStat index, Agility, GetPlayerStat(index, Agility) + 5

SetPlayerStat index, Intelligence, GetPlayerStat(index, Intelligence) + 10

SetPlayerStat index, Willpower, GetPlayerStat(index, Willpower) + 10

SendStats index

End If

End Select

Does ​somebody help me?

Code coming from here -> http://www.touchofde…sses-after-lvl/ .

Do the necessary checks that checks if the player is a certain level. If so call the sub SendAnimation with mapnum of the player, the animation number and the x and y of the player.

Thanks i’ll try it.

Like that?


Sub SendAnimations(ByVal Index As Long)

Dim i As Long

Select Case GetPlayerLevel(Index)

Case 16

If GetPlayerClass(Index) = 1 Then

SendAnimation mapnum, HICCUP_ANIM, (Player(victim).x), (Player(victim).y)

End Select

For i = 1 To MAX_ANIMATIONS

	 If LenB(Trim$(Animation(i).Name)) > 0 Then

		 Call SendUpdateAnimationTo(Index, i)

	 End If

Next

End Sub

I got Compile Error: Variable not Defined. SendAnimation mapnum, HICCUP_ANIM, (Player(victim).x), (Player(victim).y)

SendAnimation (Player(victim).map), HICCUP_ANIM, (Player(victim).x), (Player(victim).y)

something like that i think, not sure… just get it’s map and place it in the first part =P

There should be a sub that handles level up. Find it and in there add this


SendAnimation(player(index).map, [animation number], player(index).x, player(index).y)

Solved.

I added this code: SendAnimation (Player(Index).Map), HICCUP_ANIM, (Player(Index).x), (Player(Index).y)

Thank you guys.

Log in to reply