Daily variable per student
Hi! I am trying to incorporate a survival challenge in which each student needs to eat 3 times a day (preferably something hearty...would actually be ideal if we could link it to how many hearts they have filled) in order to survive, and would like some help doing this.
I am very familiar with Python, but not with command blocks. I have thought to do something involving a dictionary that keeps a variable for each student, which increases each time that student eats. Then at the end of the day, their player can be killed off if they have not eaten enough, and the variables can reset for the next day.
One issue with doing this in python is that I don't think I would be able to open the coding environment without all the variables resetting...
Would anyone be able to help??
-
Hi, Sara C - I do not think there are any global variables available, other than those available in the chat command game data in the scoreboard, by setting up objectives and things. I'm not very good with that stuff.
Python is powerful, but as in all things Minecraft, you have to do them in a Minecrafty way ;) which means a little code here, a command block there, here a build, there a trick with blocks, everywhere a new feature! =] I just try to keep up on my little corner.0 -
Debbie Alexander I haven't done much with coding in the game, is there any way for the code to interact with the scoreboards or tags or anything like that?
Sara C it is definitely possible to use scoreboards to track things and create scoreboard timers to reset things after an in game day.
However, I do not know how to track the eating without using a behavior pack.
I'm not saying not possible, just that I do not know how just with command blocks and make code.I do have some experience working with behavior packs for custom lessons though.
It may be possible to make sure that hunger depletes at an accelerated rate and you might also be able to create some custom hearty foods that would replenish the hunger more than the regular minecraft foods.
However, I don't know how much time you have for figuring out/setting up such a lesson world or for how long it would be in use or if there are additional "lessons" being done within it.1
Please sign in to leave a comment.
Comments
2 comments