Using MI's ringcounter script which basically tells you how many rings are in a level with a console command. I have it altered so it displays on the HUD rather than in the console.
In case you need a screenshot...
This is a very early screenshot by the way.
This is what I currently have it set as.
Now the current issue I am having with this script... is that if there is MANY rings and I do mean MANY rings. The game lags quite badly. Some levels to note are CEZ2 & AGZ and SS3, SS6, SS7 and SS8.
I figure I needed a mapload hook so I took a look at Inu's Boss Hud Script to get a idea of what to do so the that the script will only scan the rings just once much like how his script scans the bosses once... and alas... it seems that I haven't got a clue of what I'm doing.
This is what's currently in the script by the way.
Any help with this if possible will be nice, thanks.
Oh yea forgot to mention one more thing. I don't want this script to draw the "rings left in map counter" in both Nights & Special Stages and in Match/CTF/RACE/etc. since it would look very odd.
In case you need a screenshot...
This is a very early screenshot by the way.
This is what I currently have it set as.
Now the current issue I am having with this script... is that if there is MANY rings and I do mean MANY rings. The game lags quite badly. Some levels to note are CEZ2 & AGZ and SS3, SS6, SS7 and SS8.
I figure I needed a mapload hook so I took a look at Inu's Boss Hud Script to get a idea of what to do so the that the script will only scan the rings just once much like how his script scans the bosses once... and alas... it seems that I haven't got a clue of what I'm doing.
This is what's currently in the script by the way.
Code:
local ring_list = {} //stash rings & coins
local function h(v, p)
local rings = 0 // final ring count
for mobj in thinkers.iterate("mobj")
if mobj.type == MT_RING // regular rings
rings = $1 + 1 // add one to final ring count
elseif mobj.type == MT_COIN // regular rings
rings = $1 + 1 // add one to final ring count
elseif mobj.type == MT_SUPERRINGBOX and mobj.threshold != 68
rings = $1 + 10 // add ten to final ring count
end
end
local p_ringslash = v.cachePatch("RNGSLASH")
v.draw(72, 56, p_ringslash) //ring slash
v.drawNum(111, 56, rings) //ring count
end
hud.add(h, "game")
local function hook_load() //let's not lag the game if the map has many rings
-- Old table must be completely unset!
ring_list = {}
-- Go through mobj thinkers just once
for mobj in thinkers.iterate("mobj")
-- Find all rings
if mobj.type == MT_RING
elseif mobj.type == MT_COIN
elseif mobj.type == MT_SUPERRINGBOX and mobj.threshold != 68
-- And add it to the ring list
table.insert(ring_list, mobj)
end
end
end
addHook("MapLoad", hook_load)
Oh yea forgot to mention one more thing. I don't want this script to draw the "rings left in map counter" in both Nights & Special Stages and in Match/CTF/RACE/etc. since it would look very odd.
Last edited: