Jump to content

Tweaking my character's sanity aura?


Recommended Posts

Yo it's me again lol. Anyway back to business. My character has an aura that gives other people near her sanity.

But what I want to do is make it that she needs to be at a certain sanity herself to distribute her sanity if that makes sense.

Like her sanity needs to be 100+ for it to activate.

Any help appreciated. Thanks in advance.   

Link to comment
Share on other sites

it seems you already have the aura down, so I aint going to bother with looking into that;

inst:ListenForEvent("sanitydelta", function()--when you sanity changes
	if inst.components.sanity.current >= 100 then
		-- aura strength = 10
	else
		-- aura strength = 0
	end
end)

if you cant seem to get it then post ur aura code

Link to comment
Share on other sites

20 hours ago, Aquaterion said:

it seems you already have the aura down, so I aint going to bother with looking into that;


inst:ListenForEvent("sanitydelta", function()--when you sanity changes
	if inst.components.sanity.current >= 100 then
		-- aura strength = 10
	else
		-- aura strength = 0
	end
end)

if you cant seem to get it then post ur aura code

My code is just this. 

    inst:AddComponent("sanityaura")
    inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY

Probably placed somewhere wrong because it didn't work when I tested it with a friend.

EDIT: NVM I got it. ^^

Edited by Eumon
Solved
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...