Jump to content

[help] Sanity aura that affects only one character?


Recommended Posts

Hello!

I dont know if this is even possible, but is there a way to have someone who gains sanity by standing next to a specific character, but they are the only character that is able to get the sanity boost?
I dont know how to word that any better, but I have modded Mario and Luigi into the game, and I'm trying to see if there is a way to have luigi get a sanity boost by standing next to Mario, and only luigi can get the boost. Is there even a way to connect the two files?

I havent been modding dst for all that long, and I would really appreciate help, thanks :)

Link to comment
Share on other sites

if player.prefab == "mario" then --or insert this to your mario masterfn function ( if you do - you can delete if statement )
 player:AddComponent("sanityaura")

 player.components.sanityaura.aura = GLOBAL.TUNING.SANITYAURA_SMALL
 player.components.sanityaura.aurafn = function(player, observer)

 if observer.prefab == "luigi" then return true end

 return false
 end

end

 

-- Not sure if it works, never used aurafn

Edited by Argonium
About Master FNs
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...