Jump to content

Help with full moon transformation


Recommended Posts

I'm currently assisting a friend with a character, and one of the features we'd like to include is a special Full Moon transformation. So far, I've managed to get her to transform when night comes, but I've encountered a few issues with what I have so far.

Attached is the current version of it.

scrunchie.rar

Currently, when the Full Moon comes, she changes to the placeholder skin for the transformation, and drops any body or hat items she's currently wearing. She is also meant to give a line announcing it, with different lines for the first and subsequent transformations.

However, the current issues are:

  1. She is able to simply pick up and wear the dropped clothing items, when she shouldn't be able to.
  2. She doesn't change back to normal when the night ends.

After these are finished, there are a few functions I'd like to implement during the transformation, but I'm not sure how to go about doing so:

  1. Complete immunity to freezing damage. Not insulation, but rather being able to simply ignore the damage caused by freezing. I'd still like her body temperature to be able to drop to and below 0.
  2. Giving off a cold aura, that lowers the temperature of herself and anyone in a fair-sized radius.
  3. Dropping a special item if her hunger exceeds a certain threshold (in this case, 50).

Assistance with this would be greatly appreciated!

 

Edited by EverSoNitro
Solution found for announcement issue
Link to comment
Share on other sites

I've since managed to work out the solutions to my initial problems, and would like to move on to the unimplemented features I described above. To reiterate:

  1. I'd like to make her immune to damage from cold while she's transformed. However, I don't want her to be immune to lowering temperature.
  2. Also while she's transformed, I'd like for her to give off a cold aura, affecting both herself and those around her.
  3. I'd like her to spawn a special item (which I've already prepared) whenever her hunger goes over 50. Her hunger should drop to 50 automatically whenever this threshold is reached.

Any advice or ideas for these would be greatly appreciated.

Link to comment
Share on other sites

9 hours ago, EverSoNitro said:

Also while she's transformed, I'd like for her to give off a cold aura, affecting both herself and those around her.

Try something like this :

local function GetHeatFn(inst)
	if[insert here code for whatever condition you want to have] then
		return -40
	else 
		return 0
	end
end

And (probably in masterpostinit, not sure :

 

    inst:AddTag("HASHEATER")

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    inst:AddComponent("heater")
    inst.components.heater.heatfn = GetHeatFn

I'm not sure about how it works, so you could need more than just theses lines. I suggest you to search for the heater component in game files for examples and stuff like this if needed.

Link to comment
Share on other sites

44 minutes ago, EverSoNitro said:

However, I would still like to figure out the last one, with spawning items based on her hunger level.

listen to this event

PushEvent("hungerdelta", { oldpercent , newpercent , overtime })

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...