Im making a sword, my idea was that the secondary ability is something that helps you transport yourself quickly or dodge attacks. I was thinking of something like a dash but not just use it sideways like traildash but you can use it in any direction like up to go up high or where the cursor is pointing. The problem is that I have no idea how to do it. I have found this video of a custom weapon that does exactly what I want to do. but it is generated with a command and it is not in a mod therefore I do not know how to see how it is made https://gfycat.com/eagerillhermitcrab-rocketleague
So, looking at the code that made the scythe. I think its just spear charge with direction lock removed, right? I'll look a little more into it, but that itself wouldn't be hard to do edit: Ok, so here is the main part of the code you need to be worried about Code: "altAbility":{ "stances":{ "charge":{ "duration":0.1, "armRotation":30, "weaponRotation":60, "twoHanded":false, "allowRotate":true, "allowFlip":true, "weaponOffset":[0.2, 1.2] }, "dash":{ "duration":0.3, "armRotation":0, "weaponRotation":-90, "twoHanded":false, "allowRotate":true, "allowFlip":true, "weaponOffset":[0.2, 1.2] } }, "baseDps":2.0, "energyUsage":60, "projectileEnergyCost":80, "cooldownTime":2, "dashMaxSpeed" : 150, "dashControlForce" : 1600, "maxDashTime" : 0.30, "freezeTime":0.1, "lightningChargeLevels" : [[0.7, 0, 0.05, [210, 120, 20, 30]], [0.8, 0, 0.07, [210, 100, 20, 60]], [0.9, 0, 0.09, [210, 80, 20, 90]], [1.1, 0, 0.12, [210, 40, 20, 120]]], "dashLightning" : [1, 0, 0.12, [210, 20, 20, 150]], "damageConfig":{ "damageSourceKind":"axe", "statusEffects":[ {"effect":"burning", "duration":6.0} ], "knockback":10} } this is everything that determines the altAbility. If you want to make a spear that has this, luckily you don't need 90% of this code. The main part for you to worry about it is "allowRotate":true, "allowFlip":true, this should be what allowed the spear charge to be aim-able So when you make your spear file, you need everything under the altAbility { } in your file and it should work fine, as long as you make sure to set the altAbility to spearcharge Here is an example if that was hard to understand... Code: { "itemName" : "YourSpearName", "price" : 960, "level" : 3, "maxStack" : 1, "rarity" : "Uncommon", "description" : "A spear to let me teleport around!", "shortdescription" : "YourSpearNameHere", "tooltipKind" : "sword", "category" : "spear", "twoHanded" : true, "itemTags" : ["weapon","melee","spear"], "inventoryIcon" : "SpearIconFileNameHere.png", "animation" : "/items/active/weapons/melee/spear/spear.animation", "animationParts" : { "handle" : "", "blade" : "SpearImageNameHere.png" }, "animationCustom" : { "sounds" : { "fire" : [ "/sfx/melee/swing_spear.ogg" ] } }, "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"], "elementalType" : "physical", "aimOffset" : -1.0, "primaryAbilityType" : "spearstab", "primaryAbility" : { "fireTime" : 0.95, "baseDps" : 10.5 }, "altAbilityType" : "spearcharge", "altAbility":{ "stances":{ "charge":{ "duration":0.1, "armRotation":30, "weaponRotation":60, "twoHanded":false, "allowRotate":true, "allowFlip":true, "weaponOffset":[0.2, 1.2] }, "dash":{ "duration":0.3, "armRotation":0, "weaponRotation":-90, "twoHanded":false, "allowRotate":true, "allowFlip":true, "weaponOffset":[0.2, 1.2] } } } "builder" : "/items/buildscripts/buildunrandweapon.lua" }