#Chest Screen
1 messages · Page 1 of 1 (latest)
Store $container_title in another variable first. Then use that variable in conditions
Thats all?
{
"namespace": "chest_screen",
"chest_background_large": {
"type": "image",
"variables": [
{
"requires": "default",
"$custom_title": "$container_title"
},
{
"requires": "($custom_title = 'skill_tree')",
"$chest_texture": "textures/gui/l_skilltree_gui",
"$chest_size": [ 256, 256 ]
},
{
"requires": "(not $custom_title = 'skill_tree')",
"$chest_texture": "textures/ui/generic_54",
"$chest_size": [ 176, 276 ]
}
],
"texture": "$chest_texture",
"size": "$chest_size",
"anchor_from": "center",
"anchor_to": "center",
"layer": 1
}
}
Like this
Where did you find "default" for requires in variables array
Just define the variable normally outside the variables array
Alr
That gonna be all?
Gonna work?
{
"namespace": "chest_screen",
"chest_background_large": {
"type": "image",
"$custom_title": "$container_title",
"variables": [
{
"requires": "($custom_title = 'skill_tree')",
"$chest_texture": "textures/gui/l_skilltree_gui",
"$chest_size": [ 256, 256 ]
},
{
"requires": "(not $custom_title = 'skill_tree')",
"$chest_texture": "textures/ui/generic_54",
"$chest_size": [ 176, 276 ]
}
],
"texture": "$chest_texture",
"size": "$chest_size",
"anchor_from": "center",
"anchor_to": "center",
"layer": 1
}
}
yeah should work
np
doesnt work, idk why lol
What's your code?
The same
This
Maybe try changing the layer @halcyon kite
Also, where did you insert this (I assume custom) control? There isn't a vanilla control named chest_background_large
oh I totally forgot about this
if the code is the whole chest_screen,json file then that is the reason
it needs to be in some way included in the screen element
damnn
that was my issue
What should i do
nop, in chest_screen.json
(Chatgpt code)
i dont have any idea
I'm more impressed by the fact that you managed to write code that is technically correct with Chat GPT, which usually hallucinates
damnn
how should it make the chest screen
What were you trying to do?