need help on Custom HUD :c

Pikα

Im Pika.
Hi everyone, I was making a custom hud to my mod (with custom sprites), and when i tried to put those in game, i realise that the sprites were too big, so i wanted to know if there's ways to change the size of the sprites by code.
(also sorry if i sound rude qwq)
 
use the hook "HUD" or hud.add(), the library: https://wiki.srb2.org/wiki/Lua/Functions#HUD_library and the hook: https://wiki.srb2.org/wiki/Lua/Hooks#HUD
examples:
hook:
Lua:
addHook("HUD", function(v)
    v.drawString(0, 0, "Hello!") // Draws "Hello!" on the screen
end)
hud.add:
Lua:
local function customHud(v)
    v.drawString(0, 0, "Hello!") // Draws "Hello!" on the screen
end
hud.add(customHud)
Me casually trying to figure out how to make this script show a custom sprite instead of "Hello!":
srb20002.png
 

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top