We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Morph Factors – dynamic Health/HP limiting health restored to health bar frame

Home Forums Puzzles Morph Factors – dynamic Health/HP limiting health restored to health bar frame

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #79607
    c4cc
    Participant

    I’m trying to create an object’s Morph Factor (B) which value is limited by that of another object’s morph factor (A). Both A and B values can change depending whether they’re near certain objects. I need to get the difference between A and B to determine the limits of B’s morph factor.

    My puzzle’s not working:

    ol4x1

    • This topic was modified 3 weeks, 3 days ago by c4cc.
    #79608
    c4cc
    Participant

    2nd attempt, still no results

    ol4x1

    #79611
    xeon
    Customer

    You will need to validate that the conditions of your logic are actually occurring?

    I suggest adding some simple print to console statements for each condition so you can validate if the conditions you are testing are firing as expected.

    Values from the getmorph puzzle is a “number” so you can do what ever math you want to it and stick it back into a setmorph puzzle.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #79612
    c4cc
    Participant

    I tried it on a similar get morph/set morph puzzle set, and it works

    ol4x1

    But what I’m trying to do here is to prevent one morph factor value to exceed another’s

    #79613
    xeon
    Customer

    You may want to try using the Clamp puzzle. If you have two morph values A and B and B is to always be less than A and assuming they have the same morph value ranges (0 to 1) then you can just use the clamp puzzle to ensure the B morph value is less than the A value minus. 0.1 but will allow it to be any value between 0 and .9.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #79615
    c4cc
    Participant

    Could you tell me where I got clamp wrong? What I’m trying to do is an upgradeable life bar, like in the Megaman (X) games

    ol4x1

    • This reply was modified 1 month ago by c4cc.
    #79620
    c4cc
    Participant

    Here, Morph Factor B value can be only be increased After Morph Factor A’s is increased. I want to be able to increase Morph Factor B’s value if it’s below a certain level despite Morph factor A being untouched.

    ol4x1

    #79753
    c4cc
    Participant

    Morph Factors – dynamic Health/HP limiting health restored to health bar frame

    I’m trying to create an HP bar upgradable up to 5 times, and restoring health 20% of health bar per healing item. How do I use morph factor to capture/store the latest health frame value after upgraded to prevent the health from extending past it?

    HealthBar Frame has 0 value at default morph factor, and 1 at max.

    ol4x1

    HealthBar has 0.5 value at default morph factor, 0 at minimum and 1 at max.

    ol4x1

    Think of video games like Megaman X where the health bar is upgradeable, but the health restored cannot exceed the upgraded health bar frame size.

    Problem is, after the 2nd health upgrade, I cannot get the health restored to be within the limits of the upgraded health frame. As per below, when I tried to apply [0.6] and above for the healthbar morph factor as indicated, the health bar cannot get healed.

    ol4x1

    Is there a more “economical” way for me to simplify this health upgrading process, like javascript looping function? Obviously it’s inefficient to repeat same code for different value.

    verge3d app attached

    https://drive.google.com/file/d/1yO4sZ6mjgWa25o0SUMtOfXib9DEO4T4Q/view

    • This reply was modified 3 weeks, 5 days ago by c4cc.
    • This reply was modified 3 weeks, 5 days ago by c4cc.
    • This reply was modified 3 weeks, 5 days ago by c4cc.
    #79757
    xeon
    Customer

    Here is a simple example of a health bar using Shape Keys.
    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:f2f27a4091/x3l_healthbar.zip
    Blend file included.

    There are two cubes – left and right. Clicking on the left cube simulates something that would deduct from health…..the right cube simulates and input that would add to the health.

    Hope this helps.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #79759
    c4cc
    Participant

    Thanks for the effort but unfortunately that’s not what I need. What I really need is a healthbar that is restored up to a limit when healed. Only time the healthbar’s limit gets bigger after getting into contact with upgrades.

    Here at 0.30 – 0.33, the yellow healthbar on the top left of screen is at max, even though it comes into contact with health items. At 2:15, the yellow healthbar is upgraded. At 2:27 – 2:30, the healing items do not exceed the health bar frames

    • This reply was modified 3 weeks, 5 days ago by c4cc.
    • This reply was modified 3 weeks, 5 days ago by c4cc.
    #79761
    xeon
    Customer

    Perhaps if you have a storyboard that explains what you need. Health bars in most games have a set size and the thing that changes is the range amount. As an example at level 1 the health bar might be 0-100 while at level two the bar values might be 0-200 but the bars dimensions do not change only the values. Is this what you are wanting? Do you have a storyboard you can share ?

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #79763
    c4cc
    Participant

    No story for my game. It’s just that the health bars’ dimensions I use would increase with health upgrades. Even in the megaman game I shared just now, the physical dimension of the health bar did increase after upgrades

    Only in the pokemon games, the health bars’ dimensions did not increase physically

    • This reply was modified 3 weeks, 5 days ago by c4cc.
    #79770
    xeon
    Customer

    Well…after re-reading this thread I believe our communication is more the issue than the problem you “might” be having. So let me see if I can try a different form of communication to get us on tract.

    Let start by defining the “The Health Bar” – this would be the white frame, the black background, the grayed out “leds” and the colored leds.

    Lets further define the request as a method of doing this via “shape keys” and math functions that change the values from shape keys to drive the animation of the “Health Bar”.

    I dont believe this is the best approach based on the example you provided. I would suggest using textures to create the “Health Bar” and its animation. I would not recommend using shape keys for this at all.

    However…if your project requires you to use shape keys as you have stated, then the example I provided will work. Note: the health bar does not change shape, it does not grow in dimension at any time in the video you provided. The only activity you see is the health bar led bar indicator increasing and decreasing based on inputs.

    In the sample file, as soon as you max out your health…even if you keep clicking the right cube the health bar doesn’t get any bigger. It will be up to you to take this example and extrapolate to your use case.

    I have updated the example to include a frame and a division so you can see one approach. Again…this would be best achieved with a texture not a mesh.

    I hope this is helpful, if not, I may not be understanding the request…but try this latest version and see if this is the effect.

    https://v3d.net/16tp

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #79771
    c4cc
    Participant

    Thanks for your time and effort, unfortunately, I need the health bar frame to increase, after getting health upgrades, and health bar does not go beyond the limit. I only want health bar to have max level depending on the health bar frame:

    338-Em002-2

    How does textures work in the case of increasing dimensions?

    Example of what I want:
    Here at 2:46-2:48, player health is upgraded. At 3:02, health items do not go more beyond the healthbar frame

    • This reply was modified 3 weeks, 4 days ago by c4cc.
    #79777
    c4cc
    Participant

    Ok, actually I think I’ve figured out the problem – change the shape key from 0 to 0.5:

    ol4x1

    Updated puzzles

    ol4x1

    New updated puzzles and Blend file:

    https://drive.google.com/file/d/1yO4sZ6mjgWa25o0SUMtOfXib9DEO4T4Q/view

    Now my only problem is that the shape key in verge3d is black at 0.5, yet when it increases, it switches to its intended color. Why?

    HealthBar Frame’s shape key at 0.5:

    ol4x1

    After increasing shape key:

    ol4x1

    • This reply was modified 3 weeks, 3 days ago by c4cc.
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.