|
Post by Jader on Nov 20, 2017 23:46:45 GMT
Hi,
I'm making a little system to control hunger and fatigue of player.
I created a script with this variables. I add an new attribute to the vItemEnums script and created the item (food) in item list.
And now, how i get the value that item gives to my own script?
Thanks
|
|
|
Post by Jader on Nov 23, 2017 0:36:48 GMT
I think that a event system would be very useful. We could add animations, sounds and other things when using the items.
|
|
|
Post by Jader on Nov 28, 2017 1:40:45 GMT
I'm embarrassed. I found in another thread the functionality i wanted:
|
|
|
Post by Invector on Nov 28, 2017 14:07:23 GMT
|
|
|
Post by tharindu on Nov 28, 2017 18:35:48 GMT
Jader lol. it would be best to see if you can dabble around the code before posting anyway . But hey, since you're adding things like hunger and fatigue, there's a free survival addon somewhere in the addons section. It seems to be working so I would recommend that you give it a try. Secondly, if you're still determined to write your own piece of code on this one, make sure you try to keep the hunger and fatigue outside the third person controller class for keeping the original controller code separate from your extensions
|
|
|
Post by Jader on Nov 29, 2017 1:24:44 GMT
I really explored the scripts before, but the function was well hidden. And I preferred to write my script because it's very simple and so I have more control over it. But thanks for the tips
|
|