#set_property

1 messages Ā· Page 1 of 1 (latest)

hazy vigil
#
"blc:power_1": {
        "set_property": {
          "blc:power": 1
        }
      }```
hazy vigil
gritty birch
#

did you initialize the property using properties yet?

#

also use ``` so that the code text can be read easily

hazy vigil
#
   {
            "filters": {"test":"int_property", "subject":"other", "domain":"blc:power", "value":1, "operator":"=="},
            "add": {
              "component_groups": [ "blc:power_1" ]
            }
          }```
hazy vigil
#

but it's not working

hazy vigil
#

I want to make an arrow that adds components according to the value of the player's "power" property

gritty birch
#

using entity properties, correct?

hazy vigil
gritty birch
#

let me search for this one...

hazy vigil
#

I tested several different shots on the arrow and they didn't work

gritty birch
#
                "property:number_range_example":{
                    "values":{
                        "min":0,
                        "max":100
                    }
                },
                "property:number_enum_example":{
                    "values":[
                        1,
                        2
                    ]
                },
                "property:string_enum_example":{
                    "values":[
                        "first",
                        "second",
                        "third"
                    ]
                },
                "property:boolean_enum_example":{
                    "values":[
                        true,
                        false
                    ]
                }
            }```
#

?entity properties

barren ospreyBOT
hazy vigil
#

i just want the property to have a value

gritty birch
#

you only need to initialize the properties first

#
  "blc:power": {
    "values": {
        "min": 0,
        "max": 1
      }
  }
}```
hazy vigil
hazy vigil
#

I give up, this shit doesn't work

#

help me...

gritty birch
#

for now just rely on variant

hazy vigil
#

😭

hazy vigil
#

help me?

gritty birch
# hazy vigil help me?

In bridge, the properties are put in the entity's description

  "your:property": {
    "type": "int",
    "range": [0 ,1]
  }
}```
and then outside `description`, use `permutations` to make the entity have a certain component depending on the entity's condition
#

This is experimental and may not work properly though

hazy vigil
gritty birch
#

I suggest you don't follow the guides in wiki.dev for now

#

because it's outdated

hazy vigil
#

and now?

#

the log said that the entity does not have the properties

#

"properties": {
"beta:scale_property": {
"client_sync" : false,
"range": [1 ,5],
"default": 1
}
}

#

it was spelled wrong but it's not working

#

@gritty birch can you fix the file for me? please

gritty birch
#

add "type": "int"

hazy vigil
#

okay

#

@gritty birchthank you so much bro! it's working, I've been looking for help for a while, thanks a lot, love you bro

gritty birch
#

šŸ‘

hazy vigil
#

šŸ˜Ž šŸ‘

hazy vigil
#

How do I set the property to be equal to a scoreboard?

#
          "blc:power": "query.scoreboard('power')"
        }```
#

this is not working, value is being 5 always

#
"properties": {
      "blc:power": {
        "type": "int",
        "client_sync" : false,
        "range": [1 ,5],
        "default": 1
    }
   }```
#

I'm using animation controller to identify the property value "query.property('blc:power') == 5"

#

even changing the score value it still runs

hazy vigil
#

"permutations" not working in player.json?

#

I used it correctly as well as the previous entity and the "permutations" are not working

#

I'm triggering the event "beta:interact" by command

#

"minecraft:entity_spawned": {
        "sequence": [
          {
            "filters": {"test":"int_property", "subject":"other", "domain":"beta:scale_property", "value":5, "operator":"=="},
            "add": {
              "component_groups": [ "blc:power_5" ]
            }
          },
          {
            "filters": {"test":"int_property", "subject":"other", "domain":"beta:scale_property", "value":3, "operator":"=="},
            "add": {
              "component_groups": [ "blc:power_3" ]
            }
          }
        ]
      },```
hazy vigil
hazy vigil
#

🄲

gritty birch
#

arrows and projectiles are things i have yet known how to do, so i can't really help you with this one