Getting an Entities Alpha

Blitz3D Forums/Blitz3D Beginners Area/Getting an Entities Alpha

boomboom(Posted 2007) [#1]
How do I find out an entities alpha value? I think I am having some documentation blindness, but I can't find the command :(


Stevie G(Posted 2007) [#2]
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.


boomboom(Posted 2007) [#3]
...sigh


jfk EO-11110(Posted 2007) [#4]
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.


(tu) sinu(Posted 2007) [#5]
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