#s

1 messages · Page 1 of 1 (latest)

night basin
#

there is another way

#

what?

#

learn how to put pictures on defined coordinates of the screen

#

im getting off pc so i cant help

#

but thats a way

wheat widget
#

@primal locust you need to make sure to set the binding type to view for source/target property to work. Also you can only pull hardcoded binding values out of the "student_buttons_collection", so I'm a bit confused why you have a variable for the binding name since you are very limited in your options there. It'd be easier to pull a binding out of the collection (like you are pulling out "#student_button_text") then use a view type binding to control visibility with an equation.

wheat widget
#

try removing your visible binding and changing last binding to

                              {
                                "binding_type": "view",
                                "source_property_name": "(#student_button_text * #clip_float)",
                                "target_property_name": "#clip_ratio"
                              }

and bringing back the clip float and set clip ratio to the new binding

wheat widget
#

It may be because the collection details for the button are left out. I will try in my world in a minute and see

wheat widget
#

@primal locust I tried a few times to get it to work with passing in the decimal directly but it still seemed to be bugging out a bit. You could probably get it to work that way if you messed around with the equation and conversion a bit more. But I decided to just pass it in as a percentage, so instead of having the student button text be 0.6, I used 60 and then divided by 100 in the equation:

{
        "custom_bar": {
          "type": "image",
          "offset": [ 0, -100 ],
          "texture": "textures/ui/experience_bar_empty_blue",
          "size": [ 127, 7 ],
          "collection_index": 1,
          "layer": 2,
          "controls": [
            {
              "custom_bar": {
                "type": "image",
                "texture": "textures/ui/experience_bar_full_blue",
                "size": [ 127, 7 ],
                "layer": 2,
                "clip_direction": "left",
                "clip_pixelperfect": false,
                "$clip_float": 100.0,
                "bindings": [
                  {
                    "binding_name": "#student_button_text",
                    "binding_type": "collection",
                    "binding_collection_name": "student_buttons_collection"
                  },
                  {
                    "binding_type": "view",
                    "source_property_name": "((#student_button_text * 1) / $clip_float)",
                    "target_property_name": "#clip_ratio"
                  }
                ]
              }
            }
          ]
        }
      },
wheat widget
#

glad it's working now 🙂

wheat widget
#

I haven't tried so I'm not sure if it'd work but you could try using source/target property to overwrite a custom binding name with a modified version of itself, which should be updated every frame. But imo if you want ui elements with good looking animation I think it's usually better to use the live player renderer element and attach the ui as a geo/texture so that it can be animated through normal RP animations in the entity definition.

primal locust
#

s

spring garnet
sage solstice