Function _IrrPlayNodeMD2Animation

au3Irr2

au3Irr2 Function Reference

_IrrPlayNodeMD2Animation

Selects the animation sequence of MD2 to be played.

#Include <au3Irrlicht2.au3>
_IrrPlayNodeMD2Animation($h_Node, $i_Animation)

 

Parameters

$h_Node Handle to a character scene node.
$i_Animation sequence should be one of the following values:
$IRR_EMAT_STAND
$IRR_EMAT_RUN
$IRR_EMAT_ATTACK
$IRR_EMAT_PAIN_A
$IRR_EMAT_PAIN_B
$IRR_EMAT_PAIN_C
$IRR_EMAT_JUMP
$IRR_EMAT_FLIP
$IRR_EMAT_SALUTE
$IRR_EMAT_FALLBACK
$IRR_EMAT_WAVE
$IRR_EMAT_POINT
$IRR_EMAT_CROUCH_STAND
$IRR_EMAT_CROUCH_WALK
$IRR_EMAT_CROUCH_ATTACK
$IRR_EMAT_CROUCH_PAIN
$IRR_EMAT_CROUCH_DEATH
$IRR_EMAT_DEATH_FALLBACK
$IRR_EMAT_DEATH_FALLFORWARD
$IRR_EMAT_DEATH_FALLBACKSLOW
$IRR_EMAT_BOOM

 

Return Value

Success: True
Failure: False

 

Remarks

MD2 format models have specific animation sequences contained within them that can be played back with a simple call.

 

Related

_IrrGetMesh, _IrrAddMeshToScene, _IrrGetMeshFrameCount, _IrrGetNodeAnimationFrame, _IrrSetNodeAnimationRange, _IrrSetNodeAnimationSpeed

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

local $MD2Mesh = _IrrGetMesh( "./media/zumlin.md2" )
local $MeshTexture = _IrrGetTexture( "./media/zumlin.pcx" )
local $SceneNode = _IrrAddMeshToScene( $MD2Mesh )
_IrrSetNodeMaterialTexture( $SceneNode, $MeshTexture, 0 )
_IrrSetNodeMaterialFlag( $SceneNode, $IRR_EMF_LIGHTING, $IRR_OFF )

_IrrPlayNodeMD2Animation( $SceneNode, $IRR_EMAT_SALUTE )

local $camera = _IrrAddCamera( 50,0,0, 0,0,0 )

WHILE _IrrRunning()
    _IrrBeginScene(0, 0, 0)
    _IrrDrawScene()
    _IrrEndScene()
WEND