How do you make a Thirst bar?

Started by gerbillover on Wed, 01/11/2017 - 19:16

Topic category: Help with MCreator's application

Last seen on 20:14, 7. Dec 2017
Joined Oct 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How do you make a Thirst bar?
Wed, 01/11/2017 - 19:24 (edited)

I'm trying to make a thirst bar for my new mod (Not Magicka, it's a private one so far), but I cannot find any way to do this. I have tried using overlays, and this makes the bar appear but I am clueless as to how to make the thirst drop over time and kill the player when it reaches 0. I know this will probably require code and I am prepared to write any code needed if you can provide for me. Thank you for your time. I am using 1.7.1 MCreator (Version 1.10.2 of MC)

Edited by gerbillover on Wed, 01/11/2017 - 19:24
0Upvote this forum topic
Last seen on 19:11, 13. Jan 2017
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
After every tick, decrease a
Thu, 01/12/2017 - 13:27

After every tick, decrease a timer value by 1, the timer being 6000, when it reaches 0

  • If thirst integer is 0
  • Take damage every 5 seconds
  • Else
  • Decrease the thirst image by 1
  • Decrease the thirst integer by 1
  •  

 

0Upvote this forum topic
Last seen on 20:14, 7. Dec 2017
Joined Oct 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Ok, I just need to know the
Thu, 01/12/2017 - 14:16

Ok, I just need to know the piece of code for how to make something happen each tick. Is it OnUpdateTick() or something similar?

0Upvote this forum topic
Last seen on 00:46, 11. Dec 2019
Joined Oct 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Would love to see a more
Fri, 03/10/2017 - 19:32

Would love to see a more detailed version of how to do this

0Upvote this forum topic
Last seen on 15:59, 8. Nov 2019
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Its most likely to be the
Sat, 03/18/2017 - 17:40

Its most likely to be the update tick. Create an event and put the decrease of thirst every tick.

0Upvote this forum topic
Last seen on 21:58, 20. Mar 2017
Joined Mar 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Tell me please how to
Sat, 03/18/2017 - 17:59

Tell me please how to properly export the mod. When I export, I get an error.

0Upvote this forum topic
Last seen on 18:24, 12. Dec 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You need a variable. Code is
Sat, 03/18/2017 - 22:00

You need a variable. Code is not required for variables.

0Upvote this forum topic