Scripts / [SOLVED] Can someone figure out why my HUD script is not appearing on screen

Author
Message
Toady7
User Offline
Joined: 20th Jul 2021
Location:
Posted: 4th Sep 2021 04:08
function Custom_hud_init(e)
MetalImage = LoadImage ("scriptbank\\images\\HUD\\Metal.png")
MetalSprite = CreateSprite ( MetalImage )
SetSpriteDepth ( MetalSprite , 100 )
end

function Custom_hud_main(e)
SetSpritePosition ( MetalSprite , 200 , 200 )
end

The author of this post has marked a post as an answer.

Go to answer
PM
AmenMoses
GameGuru Master
5
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Sep 2021 08:54
This post has been marked by the post author as the answer.
Function names must exactly math the script name and must be lower case.

Apart from that the SetSpritePosition ( MetalSprite , 200 , 200 ) is actually telling it to be off screen!
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2021-11-27 12:08:55
Your offset time is: 2021-11-27 12:08:55