#Show image using Chat.

1 messages Β· Page 1 of 1 (latest)

tardy moon
#

As what the title says, I want to display image using chat, but the image is always visible even tho I didn't send anything in chat yet. Is there something I need to do?

{
  "test": {
    "type": "image",
    "texture": "textures/ui/Black",
    "anchor_from": "center",
    "anchor_to": "center",
    "size": [
      64,
      64
    ],
    "offset": [
      0,
      0
    ],
    "bindings": [
      {
        "binding_name": "#chat_text",
        "binding_name_override": "#text",
        "binding_type": "collection",
        "binding_collection_name": "chat_text_grid",
        "binding_condition": "once"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#text = 'test:')",
        "target_property_name": "#visible"
      }
    ]
  },
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": [
          {
            "[email protected]": {}
          }
        ]
      }
    ]
  }
}```
terse trail
#

you need to inizialize factory for chat

tardy moon
terse trail
#

anywhere

tardy moon
terse trail
tardy moon
terse trail
tardy moon
# terse trail limits the number of possible factory elements. you don't have to set it.

Hmmm... Last question.

{
  "test": {
    "type": "image",
    "texture": "textures/ui/Black",
    "anchor_from": "center",
    "anchor_to": "center",
    "size": [
      64,
      64
    ],
    "offset": [
      0,
      0
    ],
    "bindings": [
      {
        "binding_name": "#chat_text",
        "binding_name_override": "#text",
        "binding_type": "collection",
        "binding_collection_name": "chat_text_grid",
        "binding_condition": "once"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#text = 'test:')",
        "target_property_name": "#visible"
      }
    ]
  },
  "factory": {
    "name": "chat_item_factory",
    "control_ids": {
      "chat_item": "[email protected]"
    }
  },
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": [
          {
            "[email protected]": {}
          }
        ]
      }
    ]
  }
}```
#

Is this valid? Or do I need to put it on a panel first?

terse trail
#
{
  "test": {
    "type": "image",
    "texture": "textures/ui/Black",
    "anchor_from": "center",
    "anchor_to": "center",
    "size": [
      64,
      64
    ],
    "offset": [
      0,
      0
    ],
    "bindings": [
      {
        "binding_name": "#chat_text",
        "binding_name_override": "#text",
        "binding_type": "collection",
        "binding_collection_name": "chat_text_grid",
        "binding_condition": "once"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#text = 'test:')",
        "target_property_name": "#visible"
      }
    ]
  },
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": [
          {
            "test": {
              "factory": {
    "name": "chat_item_factory",
    "control_ids": {
      "chat_item": "[email protected]"
    }
  },
"type": "panel",
"size": [ "100%c", "100%c"]}
          }
        ]
      }
    ]
  }
}
tardy moon
#

Yeah, I'm correct I need to put that inside of the root panel

#

Thanks πŸ™

terse trail
#

Great

tardy moon
# terse trail Great

So ummm... Sorry, is it normal that if I type a message in chat even if it doesn't match the text required... it shows up?

terse trail
#

so use tellraw

#

of different type of output

#

of better for make separate binding just for there symbols deletion (If it possible)

tardy moon
#

as i said, I just type random it shows up even tho it shouldn't

#

-# yeah I'm kinda annoying here now lmfao

terse trail
#
      {
        "binding_name": "#chat_text",
        "binding_name_override": "#text",
        "binding_type": "collection",
        "binding_collection_name": "chat_text_grid",
        "binding_condition": "once"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#text - '<' - '>' - ':')",
        "target_property_name": "#new_text"
      }
      {
         "binding_type": "view",
         "source_property_name": "(#new_text= '_test:')",
         "target_property_name": "#visible"
      },
#

But I'm not sure If it will work

tardy moon
terse trail
tardy moon
terse trail
tardy moon
tardy moon
terse trail
#

If that doesn't work, then all you have to do is catch the players' messages through the script and send them in a different form, but try it.

tardy moon
tardy moon
sacred marsh
sacred marsh
# tardy moon Yup.

What I'm struggling with at the moment, is not really the filtering part but parsing chat data into a panel somewhere. Would you mind helping me πŸ‘‰ πŸ‘ˆ ?

tardy moon
#

Shit

#

yeah, sorry i forgot about this since I'm was busy as hell

distant crane
tardy moon
distant crane
#

everything can obviously be removed ?

#

Just to be sure

distant crane
#

Hey @tardy moon could I know how did U made it? Please? c':