You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a custom sword(a copy of the vanilla sword with a different sprite) and when I stab someone with it it spins them around uncontrollably and breaks bones or dismembers them.
I also tried using a retextured rod and adding a sharp axis but that didn’t work.
Relevant code:
ModAPI.Register(
new Modification()
{
OriginalItem = ModAPI.FindSpawnable("Sword"), //item to derive from
NameOverride = "Cutlass", //new item name with a suffix to assure it is globally unique
DescriptionOverride = "Flimsy sword often used by pirates, has a sharp edge.", //new item description
CategoryOverride = ModAPI.FindCategory("Pirate mod"), //new item category
ThumbnailOverride = ModAPI.LoadSprite("Sprites/Cutlass.png"), //new item thumbnail (relative path)\
AfterSpawn = (Instance) =>
{
Instance.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("Sprites/Cutlass.png");
/* var properties = ModAPI.FindPhysicalProperties("Metal");
properties.Sharp = true;
properties.SharpAxes = new[]
{
new SharpAxis(Vector3.up, 0f, 0.5f, true, false),
// new SharpAxis(-Object.transform.up, 0f, 0.5f, true, false)
};*/
Instance.GetComponent<PhysicalBehaviour>().Properties = properties;
Instance.FixColliders();
}
}
);
The text was updated successfully, but these errors were encountered:
I made a custom sword(a copy of the vanilla sword with a different sprite) and when I stab someone with it it spins them around uncontrollably and breaks bones or dismembers them.
I also tried using a retextured rod and adding a sharp axis but that didn’t work.
Relevant code:
ModAPI.Register(
);
The text was updated successfully, but these errors were encountered: