Page 1 of 1

Stun in "Melee Attack"

Posted: Tue Apr 28, 2015 6:22 am
by David Ward
We're trying to make a weapon have a stun chance on melee attack, but cannot find the correct syntax for the component. For example:

{
class = "MeleeAttack",
name = "slash",
uiName = "Power Slash",
energyCost = 25,
pierce = 15,
attackPower = 32,
--stunChance = 80,
buildup = 2,
cooldown = 6,
swipe = "horizontal",
attackSound = "swipe_heavy",
gameEffect = "Buildup: 2 seconds",
},

stunChance = 80, of course, does nothing. What would be the correct code?

Re: Stun in "Melee Attack"

Posted: Tue Apr 28, 2015 6:53 am
by minmay
causeCondition = "stunned",
conditionChance = 80,

Re: Stun in "Melee Attack"

Posted: Tue Apr 28, 2015 8:03 am
by David Ward
TY minmay.

Is there a way to change how long a stun effect will last?

Re: Stun in "Melee Attack"

Posted: Tue Apr 28, 2015 8:13 am
by minmay
using MonsterComponent:setCondition("stun",30) or whatever in the onHitMonster hook should work

Re: Stun in "Melee Attack"

Posted: Tue Apr 28, 2015 8:27 am
by David Ward
cheers