ArcBasicDocs
3DAnimation ExtraArcBasic extension

AnimSeqName

Name of an animation sequence.

AnimSeqName$ ( entity,sequence )

Parameters

entity
entity handle
sequence
animation sequence number, from 0 to CountAnimSeqs(entity)-1

Description

Returns the name of an animation sequence, or an empty string if the entity has no such sequence.

Use it with CountAnimSeqs to list the animations a model has. Sequences made with ExtractAnimSeq share the name of the sequence they were taken from.

Example

AnimSeqName.absOpen in editor
; Animation sequences by name (ArcBasic extensions); Space plays the next animation, Escape quitsGraphics3D 640,480SetBuffer BackBuffer()camera=CreateCamera()PositionEntity camera,0,.6,-2CameraClsColor camera,150,200,240light=CreateLight()RotateEntity light,45,30,0; a Kenney character (www.kenney.nl, CC0) with its animations built inhero=LoadAnimMesh("../../../media/kenney/mini-characters/character-knight.glb")TurnEntity hero,0,180,0; play the animation called "walk"Animate hero,1,.5,FindAnimSeq(hero,"walk")While Not KeyDown(1)	If KeyHit(57)		; step through every animation the model has		seq=(AnimSeq(hero)+1) Mod CountAnimSeqs(hero)		Animate hero,1,.5,seq,6	EndIf	UpdateWorld	RenderWorld	Text 0,0,"Animation "+AnimSeq(hero)+" of "+CountAnimSeqs(hero)+": "+AnimSeqName$(hero,AnimSeq(hero))	Text 0,15,"Space: next animation"	FlipWendEnd

See also