Cigg Posted February 7, 2024 Share Posted February 7, 2024 (edited) Hi! Currently trying to add the elding spear's spell to a custom weapon I made. So far reticule works, proper chargetime, most everything, but I need help with the following: >Adjusting the length of aoeweapon_lunge's distance >Making the character glow during lunge (much like wigfrid's actual elding spear effect). I could do owner.AnimState:SetAddColour and LightOverride to OnLunge but I don't know how to revert the character back to normal, except if I brute force it via dotaskintime. I'm sure there's a better method. Been looking over spear_wathgrithr but can't seem to figure it out myself, and I was hoping one of the many amazing coders here could. Can anyone help out? Thanks! Edited February 7, 2024 by sournvitriol2 Link to comment https://forums.kleientertainment.com/forums/topic/154180-help-with-creating-weapon-skill-like-wigfrids-spear/ Share on other sites More sharing options...
Cigg Posted February 21, 2024 Author Share Posted February 21, 2024 Hello once again, I figured out the above (some new math for distance and then use ListenForEvent:"animover" for doer), but now I'm looking towards understanding which prefab spawns during aoeweapon_lunge during the default OnLunged. Am trying to change the swipe effect for it. Can anyone point me to the right direction? Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/154180-help-with-creating-weapon-skill-like-wigfrids-spear/#findComment-1699669 Share on other sites More sharing options...
ant7735 Posted March 1, 2024 Share Posted March 1, 2024 (edited) Have you checked any type "onuse' or "onhit" methods within the spear prefab ? Most likely, if any AOE prefab is being spawned in, that is where you should look EDIT: This code may be of help local function LightningSpearCommonFn_Base(inst) -- aoeweapon_lunge (from aoeweapon_lunge component) added to pristine state for optimization. inst:AddTag("aoeweapon_lunge") -- rechargeable (from rechargeable component) added to pristine state for optimization. inst:AddTag("rechargeable") inst:AddComponent("aoetargeting") inst.components.aoetargeting:SetAllowRiding(false) inst.components.aoetargeting.reticule.reticuleprefab = "reticuleline" inst.components.aoetargeting.reticule.pingprefab = "reticulelineping" inst.components.aoetargeting.reticule.targetfn = Lightning_ReticuleTargetFn inst.components.aoetargeting.reticule.mousetargetfn = Lightning_ReticuleMouseTargetFn inst.components.aoetargeting.reticule.updatepositionfn = Lightning_ReticuleUpdatePositionFn inst.components.aoetargeting.reticule.validcolour = { 1, .75, 0, 1 } inst.components.aoetargeting.reticule.invalidcolour = { .5, 0, 0, 1 } inst.components.aoetargeting.reticule.ease = true inst.components.aoetargeting.reticule.mouseenabled = true end Same with: local function Lightning_OnAttack(inst, attacker, target) if target ~= nil and target:IsValid() and inst:CanElectrocuteTarget(target) and attacker ~= nil and attacker:IsValid() then SpawnPrefab("electrichitsparks"):AlignToTarget(target, attacker, true) end end Both of these functions are found in spear_wathgrithr.lua Edited March 1, 2024 by ant7735 Adding Code Link to comment https://forums.kleientertainment.com/forums/topic/154180-help-with-creating-weapon-skill-like-wigfrids-spear/#findComment-1701307 Share on other sites More sharing options...
Cigg Posted March 5, 2024 Author Share Posted March 5, 2024 Thanks for the snippets, I did check those out. But looks like the FX for the lunge itself is directly tied to the anim itself, and is animated along with the lunge, so I can't modify that without modifying the animation itself. (its called player_lunge in the anim files.) I was able to change the range and distance of the lunge however. Thanks anyway! Link to comment https://forums.kleientertainment.com/forums/topic/154180-help-with-creating-weapon-skill-like-wigfrids-spear/#findComment-1702242 Share on other sites More sharing options...
kimLimo Posted May 21, 2025 Share Posted May 21, 2025 Hello, I was searching for that subject - custom item that has skill like wigfrid's lightning lunge spear - and I really want to know how you did it. If that's fine with you, can you help me? Link to comment https://forums.kleientertainment.com/forums/topic/154180-help-with-creating-weapon-skill-like-wigfrids-spear/#findComment-1816557 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now