Bug Closed · Resolved

Bindhitbox does not work again after bone removal

#4512 opened by Unknown 2 years ago

Unknownreported this bug

Let me explain, I currently have a model which has a bone named leg0 and its subhitbox is named b_leg0hitbox [Legacy attachment omitted]

When spawning the mob it contains these skills

spiderboss_spawn:
  Skills:
  - effect:particles{particle=cloud;amount=125;hS=1;vS=1;speed=.01} @self
  - bindhitbox{m=spider_boss;p=b_leg0hitbox;t=spiderboss_leg0;delay=1} @self
  - hitboxconfig{m=spider_boss;p=b_leg0hitbox;pass=0.3;delay=1} @self

And this is the mm mob of its subhitbox

spiderboss_leg0:
  Type: VEX
  Display: '&6'
  Health: 50
  Faction: Spider
  Options:
    Silent: true
  Skills:
  - skill{s=[
      - submodel{mid=spider_boss;partid=leg0;submodelid=spider_boss;subpartid=leg0;remove=true} @parent
      - signal{s=SpiderBossSignal} @parent
      - signal{s=SpiderBossLeftLeg} @parent
      - effect:sound{s=entity.ender_dragon.hurt;p=1.3;v=1} @parent
    ]} ~onDeath

Once that, I have a skill that when you kill it, it proceeds to execute this skill to supposedly regenerate, but when you do this, the subhitboxes stay on the ground and the bone does not regenerate

SpiderLeftLegsLoop:
  Skills:
  - submodel{mid=spider_boss;partid=leg0;submodelid=spider_boss;subpartid=b_leg0hitbox;remove=false;delay=6} @self
  #
  - bindhitbox{m=spider_boss;p=b_leg0hitbox;t=spiderboss_leg0;delay=8} @self
  - hitboxconfig{m=spider_boss;p=b_leg0hitbox;pass=0.3;delay=8} @self
  #
  - setvariable{var=caster.LeftLegs;val=4} @self
  - setAI{ai=true} @self
  - setstance{stance=spiderboss_default} @self

[Legacy attachment omitted]

(In the example I use the same actions but with an OnInteract)

Unknowncommented

Inside your relayed entity, you called:

- submodel{mid=spider_boss;partid=leg0;submodelid=spider_boss;subpartid=leg0;remove=true} @parent

This means you are removing the bone leg0 from the model spider_boss.

But when you are regenerating the legs, you called:

- submodel{mid=spider_boss;partid=leg0;submodelid=spider_boss;subpartid=b_leg0hitbox;remove=false;delay=6} @self

This means you are adding a bone called b_leg0hitbox to the parent bone leg0, but you have already removed leg0, so MEG couldn't find the bone to add to. I think this is why the hitboxes are weird.

SubModel wiki page

Unknowncommented

[Legacy attachment omitted]

I don't know what to do D:

Unknowncommented

I got it, lol

Unknowncommented

I have to do something like this then `

  • submodel{mid=spider_boss;partid=all;submodelid=spider_boss;subpartid=leg0;remove=false;delay=6} @self
  • submodel{mid=spider_boss;partid=leg0;submodelid=spider_boss;subpartid=b_leg0hitbox;remove=false;delay=8} @self`
Unknowncommented

[Legacy attachment omitted]

Unknowncommented

Sorry, what I mean is that there is a bug in meg but also you used the mechanic wrong. I marked it as completed meaning it's fixed on my end

Unknowncommented

Ok, I'll wait for an update then :)

Sign in to join the discussion.