#How to change player model depending on the players tag

1 messages · Page 1 of 1 (latest)

minor zealot
#

Can you change the player model depending on what tag they have. Like one tag changes their player model to something, and another tag changes it to another model.

raw zephyr
#

I would like to know this as well.

sharp gyro
#

tag as in /tag or as in nametag?

minor zealot
#

as in /tag

sharp gyro
#

Use entity variants and call it from a /event

#

and make it a requirement to have the tag in the target parameter of said command

raw zephyr
#

Thank you!

minor zealot
#

I guess I'll make one?

sharp gyro
#

It is there, you don’t need to create one, just move it from the vanilla pack to your pack

minor zealot
sharp gyro
#

Looks like you aren’t looking in the vanilla packs 🤭

#

?vp

knotty ridgeBOT
minor zealot
#

do I then add the player.entity.json file to .../entity/?

#

the file from the sample

sharp gyro
#

You move it from the vanilla resource pack to your resource pack in the same directory it was in the vanilla pack, which is YourRP/entity

minor zealot
#

yeah, that's what I meant

minor zealot
# sharp gyro I was writing a wiki page about entity variants but I didn't feel like finishing...

I don't really understand how this code is meant to work. Like how does the behavior packs code with component groups, etc change the geometry and texture of the player. Like I don't see any correlation between the BP and RP. Nothing like, "if (variation == 1) { geometry = geomtry.zombie }. I know this isn't how the code is formulated at all, but I'm used to C#, so this syntax is very different to me.

sharp gyro
#

The variant component is set in the BP and can be read in RP basically.

dapper pond
# minor zealot I don't really understand how this code is meant to work. Like how does the beha...

I get what you mean, if you're used to how regular programming languages work this whole system seems weird but I found that the bedrock.dev website is a pretty helpful tool to understand how this system works.

They have a guide on how to build a custom entity here: https://wiki.bedrock.dev/guide/custom-entity.html

This guide explains how the BP side of entities works: https://wiki.bedrock.dev/entities/entity-intro-bp.html
and this one explains the RP side works: https://wiki.bedrock.dev/entities/entity-intro-rp

If you read these guides thoroughly I think it should make sense how the BP and RP correlate with each other. (I really helped me out at least)