The_Schwarz
Regular
I am trying to "In Mission/During Battle" add a headArmor mesh to an entity. However, it seems certain head armors will cause a hard crash access violation.
The code I am using to add the mesh is essentially a derivative of something like this:
I know so far these native helmets will throw the access violation when using GameEntity.Skeleton.AddMesh
Is there some special logic that some headarmors need to follow when being added to an entity.
Thank you for your time.
The code I am using to add the mesh is essentially a derivative of something like this:
C#:
var headArmorMeshName = agent.SpawnEquipment[5].Item.MultiMeshName;
if (headArmorMeshName != null)
{
MetaMesh tempMetaMesh = MetaMesh.GetCopy(headArmorMeshName, true, true);
for (int i = 0; i < tempMetaMesh.MeshCount; i++)
{
entity.Skeleton.AddMesh(tempMetaMesh.GetMeshAtIndex(i).GetBaseMesh().CreateCopy()}
}
}
I know so far these native helmets will throw the access violation when using GameEntity.Skeleton.AddMesh
- northern_fur_cap - sturgia_helmet_j
- nordic_fur_cap - sturgia_helmet_m
- leather_studdedhelm_over_thinhide - battania_helmet_k_a
- padded_cap - vlandia_helmet_e
Is there some special logic that some headarmors need to follow when being added to an entity.
Thank you for your time.
Last edited: