Wonderlarr Posted February 10, 2021 Share Posted February 10, 2021 Hello! I'm attempting to use the Thermal Measurer prefab (winterometer.lua) to represent the cooldown of the abiltiies visually within my mod, I have the whole prefab finished, as it's essentially just a stripped down Thermal Measurer, but I don't know how to do one thing. How can I pass the values of the cooldown, which is a timer on my character, to the meter? Also, how can I put this on the hud? Link to comment https://forums.kleientertainment.com/forums/topic/126942-creating-a-cooldown-meter/ Share on other sites More sharing options...
Bigfootmech Posted February 12, 2021 Share Posted February 12, 2021 (edited) I think prefabs go in the world, not the hud (as far as I've seen). Screens, and widgets seem to go in the hud. If you wanted to use the Thermal Measurer (scripts/prefabs/winterometer.lua) as a "cooldown" I think you'd need to figure out how to repurpose (or take apart) the ANIM file at the top (anim/winter_meter.zip), and make that a widget Similar to how the Easy Domesticate mod makes a little popup info thing in the bottom right. Other mods off the top of my head that add new UI: The "Minimap HUD", and "Insight" mods both add new things to the UI. You could maybe check them out. Also, I'm assuming you'd have to write the code to update the value of your cooldown meter. Possibly on every tick, or to "chunk" states after a time if that's too laggy. As far as I can tell, even the original does this local function StartCheckTemp(inst) if inst.task == nil and not inst:HasTag("burnt") then inst.task = inst:DoPeriodicTask(1, DoCheckTemp, 0) end end I haven't played much with this stuff yet though. So don't take my word as gospel. Edited February 12, 2021 by Bigfootmech Link to comment https://forums.kleientertainment.com/forums/topic/126942-creating-a-cooldown-meter/#findComment-1428508 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now