TheNeru Posted August 25, 2018 Share Posted August 25, 2018 Greetings! I've been using the search function to find a solution. But couldn't find any thread that would had help. [If only you can search the specific game forum than the entire community >.> ] Anywho! I need help with coding an effect on a weapon or item upon hitting/attacking the target. Say for example.. I want the Axe to deal an AoE/Cleaving attack centered on the target, hitting any other mob beside the target without the player getting hit. local function onattack_cleavea(inst, attacker, target) if attacker then [AoE damage stuff here] end end I was able to do this like years ago. The effect was able to deal AoE damage to all mobs beside the target excluding mobs that are listed. Link to comment Share on other sites More sharing options...
Lumina Posted August 25, 2018 Share Posted August 25, 2018 Maybe looking at bearger or deerclop attack ? Link to comment Share on other sites More sharing options...
TheNeru Posted August 25, 2018 Author Share Posted August 25, 2018 1 hour ago, Lumina said: Maybe looking at bearger or deerclop attack ? Yeah, Dunno where to find that. Anywho... I could vaguely remember my AoE attack script had something like this code. But when I use this code now it says Combat is a nil value inst.components.Combat:DoAreaAttack(target, 3, weapon, nil, nil, {"player", "companion", "wall"}) Also I vaguely remember a version that uses the "for i, v in ipairs" code that finds entities around the target and deal damage to both the target and mobs around it. And ignores the the ones listed in the excludetags. Link to comment 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