CommanderPro100 wrote:mrpeanut188 wrote:
Test it out, tell me what you think. But, for the walking cycle to work, you have to apply the code I posted a minute ago.
Then we'll just have to wait for Glitch to reply saying that he's made the source code change.
 
Ok, I'm editing my PM to him, need to change the Death-Frame too.
WITHOUT THE CODE, THERE IS NO WALKING ANIMATION.
[EDIT, COPIED FROM PM]
Sup Glitch.
(Go by this PM, not the thread.)
Class-Derpy.zip
Scientist.jpg.
Now, for the Derpies' walk cycle to work, you need to apply some code changes to NPCs.bb
Starting from line 1478:
Code: Select all
Case NPCtypeD 	;------------------------------------------------------------------------------------------------------------------
				RotateEntity(n\Collider, 0, EntityYaw(n\Collider), 0, True)
				
				prevframe = AnimTime(n\obj)
				
				Select n\State
					Case 0 ;idle
						n\currspeed = CurveValue(0.0, n\currspeed, 5.0)
						Animate2(n\obj, AnimTime(n\obj), 210, 235, 0.1)
					Case 1 ;walking
                        n\currspeed = CurveValue(0.015, n\currspeed, 5.0)
                        Animate2(n\obj, AnimTime(n\obj), 1, 59, n\currspeed * 18)
				End Select
				
				If n\currspeed > 0.01 Then
					If prevframe < 15 And AnimTime(n\obj)=>15 Then
						PlaySound2(StepSFX(2,0,Rand(0,2)),Camera, n\Collider, 8.0, Rnd(0.3,0.5))						
					ElseIf prevframe < 45 And AnimTime(n\obj)=>45
						PlaySound2(StepSFX(2,0,Rand(0,2)),Camera, n\Collider, 8.0, Rnd(0.3,0.5))
					EndIf
				EndIf
				
				MoveEntity(n\Collider, 0, 0, n\currspeed * FPSfactor)
				
				PositionEntity(n\obj, EntityX(n\Collider), EntityY(n\Collider) - 0.32, EntityZ(n\Collider))
				
				RotateEntity n\obj, EntityPitch(n\Collider), EntityYaw(n\Collider)-180.0, 0