| 02-09-2007, 09:34 PM | #1 |
JASS:function Searing_Flames_Damage takes unit caster, unit target, integer level returns nothing local timer t = CreateTimer() local real damage = 20+(20*I2R(level)) call UnitDamageTarget( caster, target, damage, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS ) call UnitAddAbility( target, 'A00X' ) call SetUnitAbilityLevel( target, 'A00X', level ) call IssueImmediateOrder( target, "berserk" ) // call UnitRemoveAbility( target, 'A00X' ) call SetHandleHandle( t, "caster", caster ) call SetHandleHandle( t, "target", target ) call SetHandleReal( t, "damage", 1+I2R(level) ) call SetHandleInt( t, "level", level ) call TimerStart( t, 0.20, true, function Searing_Flames_DOT ) endfunction Help, please. |
| 02-10-2007, 02:57 AM | #2 |
Are you sure "berserk" is the proper name for it? |
| 02-10-2007, 03:25 PM | #3 |
I used a similar function on one of my spells and it worked well, are you sure that your 'A00X' ability is based on the berserk ability and has the "berserk" order string? Just some things about your code: 1) You should add JASS:set t = null 2) As I wrote on this post, you should change your function using JASS:call UnitDamageTarget( caster, target, damage, false, false, ATTACK_TYPE_NORMAL, ***DAMAGE_TYPE_UNIVERSAL***, WEAPON_TYPE_WHOKNOWS ) or the damage dealt will depend on the target's armor (not like standard spells). |
| 02-10-2007, 08:58 PM | #4 |
Well, the ability's rawcode is 'A00X', and the order string is berserk. If I could make shadow1500's buff system actually work in my map, it would be easier... And I deal normal type damage because I want spells in my map to be reduced by armor. And with the set t = null. Well, I launch the timer to trigger another function, and the timer would still stay the same, so it wouldnt leak if I null it in the other function instead, would it? |
| 02-10-2007, 09:29 PM | #5 | |
Quote:
|
