Blitz3D Docs -> 3D - Category -> Entity Animation -> SetAnimTime
SetAnimTime entity,time#[,anim_seq]
Parameters:
entity - a valid entity handle.time# - a floating point time value.
anim_seq - an optional animation sequence number.
Description:
SetAnimTime allows you to manually animate entities.Comments
| ||
;Ricky Smith 10/12/2005
;SetAnimTime Example - Scroll through first 100 frames of animation using
;the SetAnimTime Command. This command allows you to manually set the current
;animation frame For your model
Graphics3D 800,600,16,2
SetBuffer=BackBuffer ()
;-----------------------------------------------------------------------------
Global player
Global frame
Global camera=CreateCamera()
CameraRange camera,1,100
MoveEntity camera,0,1.5,-4
RotateEntity camera,10,0,0
light=CreateLight(1)
LightColor light,200,200,200
RotateEntity light,45,0,0
player=LoadAnimMesh("robot.b3d")
RotateEntity player,0,-90,0
Color 255,255,255
;-----------------------------------------------------------------------------
While Not KeyHit(1)
Update()
Flip
Wend
;-----------------------------------------------------------------------------
;update gameplay
Function Update()
If KeyDown(205) frame=frame+1
If KeyDown(203) frame=frame-1
If frame>100 frame=100
If frame<0 frame=0
SetAnimTime player,frame,0
UpdateWorld
RenderWorld
Text 10,10,"FRAME:"+frame
End Function
;-----------------------------------------------------------------------------
End
|
| ||
| How did this function elude me for five years... |
Blitz3D Manual Forum
BlitzPlus Equivalent Command




