Idle Animations

So yes, I would like to have idle animations on some of my flying sprites. Could someone help me figure out how to do this, which functions or subs to call? Also, so I wouldnt have to hardcode alot of sprites in, would a toggleable checkbox in the NPC editor be possible? Thanks in advance! ~Jaxx

Add an timer let it start if the player is moving = 0

then count it and let the anim change with the timer 😉

Server side & Client side needed

NPC Checkbox is possible

Sweet thanks! Do you have a little more detail? I haven’t used vb6 in almost a year, getting kind of hazy ^_^

get CS:DE and rip from there the IsConstantAnimated stuff

I havent used it for now so i cant help you -> Ill add it later to my project first i need to finish my Char Animations

The way I handle idle animation or any frame based animated movment is that I set animation values to work with the FPS Clock in the gameloop, Since then I never look back at timers.

For NPC’s


	    With MapNpc(MapNpcNum)

		    If .AnimTimer + 100 <= GetTickCount Then

			    .Anim = .Anim + 1

			    If .Anim >= 3 Then .Anim = 0

			    .AnimTimer = GetTickCount

		    End If

		    Anim = .Anim

	    End With

For Player


	    If Player(index).AnimTimer + 100 <= GetTickCount Then

		    Player(index).Anim = Player(index).Anim + 1

		    If Player(index).Anim >= 3 Then Player(index).Anim = 0

		    Player(index).AnimTimer = GetTickCount

	    End If

	    Anim = Player(index).Anim

    End If

Where to put that should be logic -> Search attack animation stuff

add Anim as Long and AnimTimer as long

To playerrec and at mapnpcrec

Thanks guys! So just checking, for the checkbox, would you add say “Idle as boolean” to Npcrec and then make a checkbox in npc editor with the lines, “If check1.value = true then npc(editorindex).Idle = true” and then add a check to the animation would that work? Also, one millisecond after attacking I die to an Npc with 1 damage value?

Yea if you can make a function boolean

Okay, thanks. I fixed everything and made it work on EA. Works fine. Thanks you guys.

Log in to reply