id like to make so my item displays a custom attachable (a bracelet here), but only when its held in the offhand. currently, as shown in the second sc, when held in the main hand, it also displays the attachable, which i dont want. i also want it so it always displays its item form in first person, even in offhand. any help?
#Only use attachable in the offhand in third person
1 messages · Page 1 of 1 (latest)
Take a look at the crown example from the website (theoretically you only need to adjust the query)
https://learn.microsoft.com/en-us/minecraft/creator/documents/addcustomitems?view=minecraft-bedrock-stable
And then together with part visibility I think it is possible
pain why not valid 😔
oh i think itd format version
yes it is
i think im getting there ty
im not getting there im so lost :flatten:
I'll later make a test on an attachable of mine so I can show you what I mean (but that takes some hours)
no rush!
okay, i figured it out, using an armor attachable for a held slot also overrides the held form model by default. how do i make it so the item sprite model is used in first person and third person mainhand?
because if i make this a head armor or something itll work properly
but when its an offhand armor its using the armor attachable for the first person anims too
Has to do with your animation
You have one animation for using first person view and one for third
i know theres molang queries but i dont know what syntax would be used to change the geometry (this is an example from the wiki)
can i change the model with an animation?
Well you can rotate, scale and push the item around
For changing geometry you need either 2 different render controllers with conditions on which to use or 1 geometry with both possibilities and part visibility (so make it partially invisible)
i mean i will note im not using animations anymore because i figured thats not what i needed here
two render controllers sounds good, how would i go about that?
In the render controller section instead of "render.controller.attachable" do {"render.cintroller.attachable":"query. "}
And that for as many render controllers as you need and with the query that you want (on the website that I send you if you go to reference nad then molang then there should be a list of all usable and what they do) as soon as the query turns 1 or true the render controller will be used on the item (keep on mind that only 1 should ever be active at the same time)
I hope I did it right (otherwise you'll get an error and I'll need to look into the file where I did it tomorrow)
sorry, coming back to this after a break and some pain; what exactly would this look like? im having a hard time following what you said sorry 😭
Here an example in an entity
alright, i got something working! however, still shows like this in first person, when i want the item geometry applied
In the first person, do you want it to show up or not?
my original desire kinda changed but yes. i just want it so in third person, its the armor model, and in first person, its the item model
Then it seems to not use your item sprite in first person (is it a texture mesh?)
i just want the default appearance of an item in first person, would i need to recreate that here?
Since with an attachable the game won't render it without the matching geometry you will need a geometry with a mesh
ah. could i make the arm render with the model somehow?
Since you already have the geometry for the first person separately I think you just need to adjust the geometry
Do you know if I could show an attachable with a script
?
Like without an item
You can trigger an animation via script (not sure what exactly you want to have...)
I want to create cosmetics
That I can activate via a menu
I would probably try to go thru a custom geometry but for that I don't have enough experience
not sure since that would be a thing that I usually do with a render controller and geometry (can changing that can lead to incompatibility with other packs)
U can do it with a property
query.property
And what do I put in this
Put in what
What does it do
U set a property in the entity’s behavior file
Then u check the property value
Like for example
query.property(“addon:cosmetic”) == “hat”
Something along those lines
Oh okay and how do I trigger this to show on command by a script or command?
Entity.setProperty(“addon:cosmetic”, “hat”)