Feanara Posted March 22, 2021 Share Posted March 22, 2021 Hello all, I'm trying to create a new widget to show when a character is in the 'rage' state. It activates fine, but the inside is offset by a lot (see the attached picture). Then when it deactivates, the widget is still there despite it being killed by the character prefab file. Any thoughts on why this is happening? Here's the character's rage function that should hide the widget: local function LoseRage(inst) inst:PushEvent("transform_normal") inst:RemoveTag("raging") inst.AnimState:SetBuild("normal") inst.components.talker:Say("That was exhausting.") inst.components.combat.damagemultiplier = 1.1 inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED inst.components.hunger:Resume() inst.components.sanity.ignore = false inst.components.health.absorb = 0 inst.components.sanity:DoDelta(-TUNING.SANITY_MEDLARGE) inst.components.rage:StopDrainEffect() GetSeasonManager():StopPrecip() if inst.HUD then if inst.HUD.ragemeter then print('removing rage hud') inst.HUD.controls.ragemeter:Deactivate() inst.HUD.controls.ragemeter:Kill() inst.HUD.controls.ragemeter = nil end inst.HUD.controls.crafttabs:Show() inst.HUD.controls.mapcontrols.minimapBtn:Show() end end rage_meter.lua rage_meter.zip Link to comment https://forums.kleientertainment.com/forums/topic/128215-new-widget-inside-color-is-offset-doesnt-disappear-when-killed/ Share on other sites More sharing options...
Cagealicous Posted March 24, 2021 Share Posted March 24, 2021 (edited) I had this problem long ago when I made my anger meter for my character mod. Now, the issue I had was because I ripped the asset from the game's files. Instead, my friend and I had to completely create a new widget meter asset. You can use my old asset for the meter if that's your problem. (You'll just have to change all the assets and etc. Also, make sure to change the name in Spriter from "irritation" to whatever you've named your widget.) irritation.zip Also, for the widget not disappearing. I'm not sure why that happens. It could be the anim, but it could also be a code thing. My character doesn't have a meter that disappears, but rather it stays on screen since it's his whole motif. Sorry about that. Ok, this is the last time I'll have to edit this, but I also discovered that my animations don't have the "close_90s" and "open_90s". You can easily add those back in by writing a new animation for the file with recreating the frames and size displacement. It can be a bit finicky, but it should work for it. Edited March 24, 2021 by Cagealicous 1 Link to comment https://forums.kleientertainment.com/forums/topic/128215-new-widget-inside-color-is-offset-doesnt-disappear-when-killed/#findComment-1440975 Share on other sites More sharing options...
Feanara Posted March 25, 2021 Author Share Posted March 25, 2021 Thank you! I'll try this out, much appreciated. Link to comment https://forums.kleientertainment.com/forums/topic/128215-new-widget-inside-color-is-offset-doesnt-disappear-when-killed/#findComment-1441381 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