#I need help with render comtrollers

1 messages · Page 1 of 1 (latest)

light tangle
#

I'm making a Futuristic addon for mcpe where you can become an Android
I wanna make it so when you become an Android your skin texture changes I know you can do it with render controllers but idk how
Could someone drop a link to a video that explains or maybe a website
Thanks for the help

fast patrol
#

You can do it like this :

  1. Give the player a detectable data using molang, for example variants or skin_id, entity_properties could also work.

  2. Make a custom render_controller, can be inside any file.

  3. Change the Texture.default to Texture.android (the android is your player skin texture).

  4. In your player.entity.json file, inside the render_controllers put your custom render_controller when the player has the tag or data.
    Meanwhile inside the textures add your player texture path, like this : "android": "textures/entity/android_player"

light tangle
#

OK thanks I'll give it a go

#

I want it to activate when it has the tag android
So it would be variable.has_tag = android
Right?

fast patrol
#

well, not exactly
you have to go to the player.json in the behavior pack and add a filter that detects when the player has a tag
after it detects, trigger an event that gives the player a component group when they have the tag

#

variable.has_tag wouldn't work here, i think

#

because you can only detect ingame tags using environment_sensor

light tangle
#

OK np I'll just use variant
Tnx

#

Oh yh BTW is it possible to change the texture of my Croshair with render controllers

I think it is cuz I've seen it in a Resource pack before
I'd like to have it that when you become and android you have a different HUD too

velvet gorge
#

{
"format_version": "1.8.0",
"render_controllers": {
"controller.render.vasto": {
"geometry": "Geometry.default",
"materials": [ { "*": "Material.default" } ],
"arrays": {
"textures": {
"Array.texture": [
"texture.default",
"texture.mod_1"
]
}
},
"textures": [
"array.default[!query.equipped_item_any_tag('slot.armor.chest','vasto')]"
,"array.mod_1[query.equipped_item_any_tag('slot.armor.chest','vasto')]"
]
}
}
}

velvet gorge
#

someone help me

velvet gorge
#

{
"format_version": "1.8.0",
"render_controllers": {
"controller.render.true_shikai": {
"geometry": "Geometry.default",
"materials": [ { "*": "Material.default" } ],
"arrays": {
"textures": {
"Array.default": [
"texture.default"
],
"Array.mod_1": [
"texture.mod_1"
]
}
},
"textures": [
"array.default[!query.equipped_item_any_tag('slot.armor.chest','vasto')]"
,"array.mod_1[query.equipped_item_any_tag('slot.armor.chest','vasto')]"
]
}
}
}