| 02-12-2008, 02:56 AM | #1 |
For this function in my map: JASS:private function ActionTrigger takes nothing returns nothing local unit target = GetSpellTargetUnit() local integer i = GetPlayerId(GetOwningPlayer(GetTriggerUnit())) call CasterCastAbility(Player(i), 'A02W', "unholyfrenzy", target, true) set target = null endfunction |
| 02-12-2008, 06:02 AM | #2 |
Use your own dummy casters and make sure they survive and owned by the proper player until the unit no longer has the buff or has died. 'tis the only way; the CasterSystem won't do it for you. |
| 02-12-2008, 03:35 PM | #3 |
Actually it is possible to do this in caster system. There is a parameter called delay in 'CasterCastAbilityEx', which afaik may be used for exact that purpose. So you would use the duration of your buff + some buffer time to make sure that your hero would get the bounty. |
| 02-14-2008, 12:17 PM | #4 |
use this before using CasterCastAbility JASS:function CasterSetRecycleDelay takes real Delay returns nothing where Delay is the maximum duration of your spell + 1 or +0.5 |
| 02-15-2008, 10:16 PM | #5 |
More specifically, I would do this: JASS:globals private real DELAY = 1.00 //Or whatever endglobals //In your function call CasterSetRecycleDelay(YourDuration+0.50) call CasterCastAbility(...) call CasterSetRecycleDelay(DELAY) |
