( x )

alphasprite()


Create a sprite entity and return its handle.

Use this to create your own Crosshair, health bars, etc. :-)
 

Syntax


entityhandle = alphasprite( width , height , [imagefile$] , [flags] , [red] , [green] , [blue] , [alpha#] )
 

Parameters

 
Variable Description Default value
width Width of sprite in 2d dimentions -
height Width of sprite in 2d dimentions -
imagefile$ file to image you wish the sprite should display. ""
Flags Flags parameter allows you to apply certain effects to the sprite, flags can be added to combine effects. These are the same as the blitz flags:
 
Flag Description
1 Color
2 Alpha
4 Masked
8 Mipmapped
16 Clamp U
32 Clamp V
64 Spherical reflection map
128  <Void>
256 Store texture in vram
512 Force the use of high color textures

 

1
red Red color of sprite 0 - 255 255
green Green color of sprite 0 - 255 255
blue Blue color of sprite 0 - 255 255
alpha# Float value to change how transparent the sprite should be in the range 0...1.     0: invisible  1: opaque 1.0

Returns


A normal blitz entity handle, so you can use RotateEntity, Positionentity, EntityColor etc., with it.

Use PositionEntity entity,x,y,0 to place sprite at 2d coords.
 

Back