snakeyarts

  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

1 Neutral

About snakeyarts

  • Rank
    Junior Member
...
  1. Hi! Sorry for the late reply, I didn't want to rush a reply before I got to test it properly and was unable to do so before just now. It works perfectly! Thanks a ton!
  2. @IronHunter Oh woah yea, I'll be honest I never would have caught that, If that's the case I'd very much appreciate that information, since this isn't really something I know much of anything about.
  3. The title says it all. I'm not the most fluent in lua, I just do this for fun and as a challenge, and I do manage fairly okay for the most part. Right now though I'm working on a character mod with some abilities I've never messed around with and ran into an issue I'd like a second opinion on. Basically what I'm trying to do is make it so that the character gets slower and weaker at low sanity. I've got code, it doesn't give me an error message. But I very strongly suspect it's not actually doing anything/what it should, or that the scaling and effect is way weaker than I'd like. There's no glitching or anything but especially the walking speed (easier to tell) doesn't seem to be changing at all, no matter how i change the values. It's somewhat of a patchwork code. Could someone check it if there's any noticeable flaws I missed? Or any other way for me to fix it? Or is there a smarter way to do this? -- ABOVE LOCAL COMMON_POSTINIT -- sanity damage and speed scaling local function sanitydelta(inst) if inst.components.sanity.current >= 100 then inst.components.combat.damagemultiplier = 1 inst.components.locomotor.SetExternalSpeedMultiplier = 1.5 elseif inst.components.sanity.current > 75 then inst.components.combat.damagemultiplier = 0.75 inst.components.locomotor.SetExternalSpeedMultiplier = 1 elseif inst.components.sanity.current < 50 then inst.components.combat.damagemultiplier = 0.50 inst.components.locomotor.SetExternalSpeedMultiplier = 0.50 end end -- IN LOCAL MASTER_POSTINIT: inst:ListenForEvent("sanitydelta", sanitydelta) -- sanity damage and speed scaling And then just in case it might be necessary, here's the whole prefab folder. I'd appreciate any at all help and tips! hollow.lua