#How to set mark_variant via script?

1 messages · Page 1 of 1 (latest)

torpid topaz
#

Saw 1 previously asked question, but didn't find answer for me.
(The only thing I understood is that you can't set variant via script).
Trying like this:

entity.getComponent('minecraft:mark_variant').value = 1

but here is readonly value. Also trying like this:

entity.setProperty('minecraft:mark_variant', 1)

Error: property 'minecraft:mark_variant' not found.

Both methods don't work.

Help me please, guys.

shell zodiac
#

Create your own property on the entity

#

And use set property with it

torpid topaz
#

@shell zodiac yep, but i can't pass this to molang. I need check my variable in molang and do my logic

shell zodiac
#

set client sync for the property to true

#

That's a requirement so the client reads it

torpid topaz
#

and after i can use it with molang?

shell zodiac
#

Yep

torpid topaz
#

ty a lot! @shell zodiac

shell zodiac
#

I think you mean molang in rp right?

#

It should work with client sync

torpid topaz
#

molang in render controller

#

i mean it

shell zodiac
torpid topaz
#

okay

#

i'll check it later

#

thank a lot again