Started by
Jacko22
on
Topic category: Help with MCreator software
So in the link below I've got a simple procedure which changes the player's health to 100 (ignore the other one, that was for a different post). I just want to know if there is a way to change the obstructive vanilla health (that fills up the screen once it goes past 20) bar to something more streamlined that can portray all 100 HP.
Cannot view imgur, try imgbox?
https://imgbox.com/9tFVth52
Y'know, is there a less resource-intensive way of doing it other than having 400 individual textures for every possible case?
how does the "return logic" work? When ever I put one in it says "incomplete" but then I add a second, even without anything in it and it works. should the second one say nothing, true, true = true, or something else?
Just to elaborate on the pictures.
You don’t need the if, the problem is you don’t quite understand the logic. All you need is return logic, no other procedure actions, only procedure data if you get what I mean. Simply put return logic, and, health=100, and, health is more than 99, and health is less than 100. You can have as many ands and ors as you like. This is because a condition must be able to return a true AND a false at some point. That is why you needed both a return true and return false when you use an if statement.
As for the 100 images, use a sprite. You can condense all 100 into a single image. Think of it like strips of an image, each strip going down is the next stage of the bar. Mcreator will then split the image into stages and you can call each one through a single procedure.
I can send you some images later if you need
Please don't double post
Sorry about the double post Klemen, my browser's been acting odd lately.
Some images would be very helpful, thank you.
Okay so a sprite looks like this where every stage of a 'bar' is represented in layers: https://imgbox.com/cT6786cA
Then you create a sprite element in your gui, the number of sprites is the number of layers so to speak. Then you simply change the sprite number based on another value. Like so: https://imgbox.com/hb2HZtRZ
You select this return number procedure on your sprite element on index of sprite.
The reason mine has that initial subtraction is due to me putting the full part of the bar at the top of my sprite image, if you put the empty stage at the top of the image then you can remove that entirely.
For all of the return logic and for the extra variants you can do something like this: https://imgbox.com/qzmpCe3L
Let me know of anything else
Two thing: whenever I import the textures to make then a sprite it forces me into a square aspect ratio, and I can't figure out how to make the sprite render specific frames with logic. Could you help me out?
I also tried it out in game and it had the same x coordinate as in the editor, but not the same y coordinate.
What do you mean it forces you into a square ratio? The displayed texture shows up as a square in the overlay? Your image will be divided depending on which side is longer, if the image is wider than long then it will be cut into vertical sprites, and vice versa
Show me a picture of both