Getting an Entities Alpha
Blitz3D Forums/Blitz3D Beginners Area/Getting an Entities Alpha
| ||
How do I find out an entities alpha value? I think I am having some documentation blindness, but I can't find the command :( |
| ||
There isn't one - you'll have to track it's value yourself. I've heard tell of a dll which may allow you to access this information - couldn't say for sure though. |
| ||
...sigh |
| ||
The only way is a hack. Maybe Toms Memorylib.dll can do it. I had GetBrushAlpha working, but I guess that's not what you want. |
| ||
many ways around this to give entities properties, simplish one here. ;this could be properties and have stuff like shininess etc ;in too. type TAlpha field alpha# end type function SetAlpha(entity%,alpha#=1) if not entity return ThisAlpha.TAlpha = object.TAlpha(entityname(entity)) if ThisAlpha = null ThisAlpha.TAlpha = new TAlpha entityname entity,handle(ThisAlpha) endif ThisAlpha\alpha = alpha entityalpha entity,ThisAlpha\alpha return 1 end function function GetAlpha#(entity%) if not entity return -1 ThisAlpha.TAlpha = object.TAlpha(entityname(entity)) if not ThisAlpha = null return ThisAlpha\alpha endif ;alpha hasn't been set so should be 1 return 1 end function |