EntityALpha on LoadAniMesh

Blitz3D Forums/Blitz3D Programming/EntityALpha on LoadAniMesh

Fader(Posted 2003) [#1]
EntityAlpha function does not seem to work on LoadAniMesh. I can get it to work on an entity loaded with LoadMesh.
I downloaded the latest drivers for my ATI 9500 Radeon. I have DX9.0a installed. Any ideas why this would not work?

Thanks,
Fader


Binary_Moon(Posted 2003) [#2]
object=loadanimmesh("object.3ds")
entityalpha object,.5


This won't work because the variable object points at the parent of the animmesh. You need to find the children and apply the alpha value to them individually.

object=loadanimmesh("object.3ds")
entityalpha_anim object,.5

function entityalpha_anim(object,alpha#)

   entityalpha object,alpha
   
   for child=1 to countchildren(object)
      entityalpha_anim getchild(object,child),alpha
   next

end function



That should work but I haven't tested it.


Fader(Posted 2003) [#3]
Yes, that makes sense...and works.

Thank you,
Fader