Thanks again 3com, much grateful
Sorry to keep bothering you, but I'm trying to build my own hud and hit a snag with sprites.
For some reason I can't get the sprite depth to work, I want the text on top of the sprite, but it's behind, any idea what i'm doing wrong?
--text location
local heart_tex_posx = 85.5
local heart_tex_posy = 4
local heart_text_size = 20
--sprite location
local heart_spr_posx = 81
local heart_spr_posy = 1
--sprite size
local heart_spr_sizex = 9
local heart_spr_sizey = 6
function hudtest_init(e)
HideHuds()
heart_sprite = LoadImage("scriptbank\\images\\island\\health.png")
heart_icon = CreateSprite(heart_sprite)
SetSpriteSize (heart_icon,heart_spr_sizex,heart_spr_sizey)
SetSpriteDepth (heart_sprite, 100)
end
function hudtest_main(e)
if g_max_PlayerHealth == nil then
g_max_PlayerHealth = g_gameloop_StartHealth
end
TextCenterOnX(heart_tex_posx,heart_tex_posy,1,""..g_PlayerHealth.." / "..g_max_PlayerHealth)
SetSpritePosition(heart_icon,heart_spr_posx,heart_spr_posy)
end
see? I am at least trying to learn.... my head hurts now
i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.