Jump to content

Recommended Posts

So... Hi, it s me again, i m having some trouble with this idea of mine of having an attribute base value like for example: 
I want to have 180 on hunger at the start, since you enter the world, but, you still have the max cap of 300. How could i make that to work? Good Morning/Good night idk what time of the day someone will see and Happy holidays aswell!

Edited by kOnoNicolasGa
3 hours ago, leonidas_iv said:

You can simply set the player's hunger when he enters (which I don't know how to check) with a simple:


c_sethunger(0.6)   --> 0.6 = 180/300

 

Well, it kinda works, but i need to type everytime right? I wan t to put that into the scripts, like, i wish him starts with almost half of his hunger. Do you know how could i do that?

Edited by kOnoNicolasGa
40 minutes ago, kOnoNicolasGa said:

Well, it kinda works, but i need to type everytime right? I wan t to put that into the scripts, like, i wish him starts with almost half of his hunger. Do you know how could i do that?

You can call GLOBAL.c_sethunger(0.6) in the script, but you have to figure out how to apply this only at the beginning of the game.

 

38 minutes ago, Leonidas IV said:

You can call GLOBAL.c_sethunger(0.6) in the script, but you have to figure out how to apply this only at the beginning of the game.

I see, so it s kinda hard then i thought. I was just wanting him to enter the constant with half of hunger... Well, Tysm, i will try to solve that.

1 hour ago, kOnoNicolasGa said:

I see, so it s kinda hard then i thought. I was just wanting him to enter the constant with half of hunger... Well, Tysm, i will try to solve that.

See other things that happen at player spawn, like starting items, etc.

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
×
  • Create New...