Tic Tac 2 Posted April 28, 2015 Author Share Posted April 28, 2015 From this tutorial: [**Hunger System**](http://www.eclipseorigins.com/index.php?/topic/136474-evb-eo2x-hunger-system/)I have a problem. Sometimes, Hunger will stop draining for people sometimes. I'm not sure when this happens but one guy is stuck at 67% hunger, i'm stuck at 100%, another guy is stuck at 44%. If somebody could look at the code in the tutorial to see what's wrong, that would help a lot. And if anybody would like to help me on teamviewer, i'll pay you 8 bucks.**Status: Unsolved.**I'm trying to debug.Edit1: Tried shutting of the server abruptly, this does not stop the timer from going down. Edit2: Eating something does not make the timer stop.Edit3: Updating the map via map editor does not make timer stop.Edit4: Tried most events, events do not make timer stop.Edit5: Dying to an NPC does not make the timer stop.**Edit6: According to one player, it froze when he was AFKing.** Link to comment Share on other sites More sharing options...
skymen Posted April 28, 2015 Share Posted April 28, 2015 Hey.If it froze when he was AFK, the source of the problem is in the code that manages **_what_** makes the hunger going down. Could you post a screen of your code, or the link to the tutorial, so I can see what's wrong.EDIT: Don't read my last sentence. I saw you already posted your link (sorry xD)<EDIT 2: Okay, so, I read the code, and it seems to have absolutely no problem. So, I'll ask you to try some things so we can find the real source of the problem.First: try reducing your hunger timer a lot, so it is extremely visible to see your hunger going down. 1 second should be good (60 ticks I think).Secondly, do you have any "Away" system that activates when a player is afk? If so, the problem might be there (If there is one in the features of the engine, the problem could come from there too)Thirdly, Try using extremely quickly multiple food items. There could be a glitch there that blocks your hunger when consuming food too quickly.Then, don't forget to activate debug mode each time you do this, to see what happens when you do anything.Also add the hunger value to the debugger to see if it is a display problem. Link to comment Share on other sites More sharing options...
Tic Tac 2 Posted April 28, 2015 Author Share Posted April 28, 2015 > Hey.> > If it froze when he was AFK, the source of the problem is in the code that manages **_what_** makes the hunger going down. > > Could you post a screen of your code, or the link to the tutorial, so I can see what's wrong.> > EDIT: Don't read my last sentence. I saw you already posted your link (sorry xD)<> > > > EDIT 2: Okay, so, I read the code, and it seems to have absolutely no problem. So, I'll ask you to try some things so we can find the real source of the problem.> > > > First: try reducing your hunger timer a lot, so it is extremely visible to see your hunger going down. 1 second should be good (60 ticks I think).> > > > Secondly, do you have any "Away" system that activates when a player is afk? If so, the problem might be there (If there is one in the features of the engine, the problem could come from there too)> > > > Thirdly, Try using extremely quickly multiple food items. There could be a glitch there that blocks your hunger when consuming food too quickly.> > > > Then, don't forget to activate debug mode each time you do this, to see what happens when you do anything.> > > > Also add the hunger value to the debugger to see if it is a display problem.Hey. I'll try reducing the hunger timer so it's fast. I don't have any away systems i think, i'm using eclipse the final frontier. (EO3.0 expansion)i'll try the third suggestion too.Also, I have debug mode activated, but i don't see any form of window of code or anything.Editing when i've done this.EDIT: Reduced the timer now so its easier to debug.EDIT2: Eating food fast doesn't seem to cause any difference.Also, i have three different kinds of hunger. Hunger, thirst and Energy.But since those scripts dont interact with each other in any way i doubt that's a problem.I just did the tutorial three times but renamed hunger to thirst and sleep the two other times.EDIT3: It's not a display problem. You're supposed to die when your hunger/thirst/sleep hits 0, and some people never die of hunger depletion.Can you take a look at my code through TeamViewer? I'll pay you if you fix this for me <3 Link to comment Share on other sites More sharing options...
Tic Tac 2 Posted April 28, 2015 Author Share Posted April 28, 2015 **bump** Link to comment Share on other sites More sharing options...
skymen Posted April 30, 2015 Share Posted April 30, 2015 Hi, I thought you found someone who was about to fix this. Seems that it didn't turn out well :/.Anyway. I have a question.Since you made the tutorial 3 times to add hunger, thirst and energy, does this happen with other bars?If not, then there HAS to be a mistake done while copying the code to your game. Try redoing the tutorial to add another hunger bar. See if it works. It should, if other bars do. Then delete your first bar. Link to comment Share on other sites More sharing options...
Tic Tac 2 Posted April 30, 2015 Author Share Posted April 30, 2015 > Hi, I thought you found someone who was about to fix this. Seems that it didn't turn out well :/.> > Anyway. I have a question.> > Since you made the tutorial 3 times to add hunger, thirst and energy, does this happen with other bars?> > If not, then there HAS to be a mistake done while copying the code to your game. Try redoing the tutorial to add another hunger bar. See if it works. It should, if other bars do. Then delete your first bar.Yes. It happens with all bars. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now