Jump to content

Is it possible to create a perk for a character that increases stats when near others?


Recommended Posts

I was wondering what exactly I should type into my character's .lua file. I want them to have great stats when within a certain proximity of one or more friendly players. Similar to the distance in which you can see someone's face in a small circle on the edge of your screen when they're nearby.

Like:

{

if,

my****tycharacter_distance_to_another_player=40(meters?),

                    then,

                         Health=200,

                         Hunger=200,

                         Sanity=200,

if else,

           then,

                  Health=100,

                  Hunger=100,

                  Sanity=100,

}

He'll be weak alone, but kind of op with teammates. Also I'm not really a coder lol. I tried to look for this info but all I found were other topics depicting a different but similar problem, so I thought I'd make my own topic.

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...