au3Irr2 Function Reference
_IrrAddFadeAnimatorThis animator deletes the node it is attached to after the specified number of milliseconds.
#Include <au3Irrlicht2.au3>
_IrrAddFadeAnimator($h_Node, $i_DeleteAfterMiliseconds, $f_Scale = 1.0)
Parameters
$h_Node | Handle of a scene Node. |
$i_DeleteAfterMiliseconds | Number of milliseconds before deleting the node. |
$f_Scale | Scaled amount while fading. |
Return Value
Success: Handle of the created animator.Failure: False
Remarks
During the time while it is waiting to delete it the node is slowly faded to invisibility and is also scaled by the specified amount.You could use this animator to fade and delete an object from a scene that was no longer required like a used medical pack,
all you would need to do is attach the fade animator and forget about it.
Related
_IrrAddDeleteAnimator, _IrrRemoveAnimator
Example
#include "au3Irrlicht2.au3"
Global $hMD2Mesh, $hMeshTexture, $hSceneNode
_IrrStart()
$hMD2Mesh = _IrrGetMesh("./media/zumlin.md2")
$hMeshTexture = _IrrGetTexture("./media/zumlin.pcx")
$hSceneNode = _IrrAddMeshToScene($hMD2Mesh)
_IrrSetNodeMaterialTexture($hSceneNode, $hMeshTexture, 0)
_IrrSetNodeMaterialFlag($hSceneNode, $IRR_EMF_LIGHTING, $IRR_ON)
_IrrSetAmbientLight( 1,1,1 )
_IrrAddFadeAnimator($hSceneNode, 3000, -1)
_IrrAddCamera(50, 0, 0, 0, 0, 0)
While _IrrRunning() And Sleep(10)
_IrrBeginScene(240, 255, 255)
_IrrDrawScene()
_IrrEndScene()
WEnd
_IrrStop()