Hi everyone, I am practicing to create a new skill Circle Pit liked Pit of Malice in DotA. Everything is quite good, only effect has problems. If cooldown of the skill < 6s (period "survival" of effect), the last effect will be removed, but the first won't. Can you help me to finish this skill, or guide me to create the skill like Pit of Malice. Thank you very much. Here is my code :
Code:
Circle Pit
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Circle Pit
Actions
[B]Set CirclePitTimes = (CirclePitTimes + 1)[/B]
Set CirclePitCaster = (Casting unit)
Set CirclePitTargetPoint = (Target point of ability being cast)
Set CirlcePitRegion = (Region centered at CirclePitTargetPoint with size (410.00, 400.00))
Set CirclePitStopGroup = (Units within 410.00 of CirclePitTargetPoint matching (((Matching unit) belongs to an enemy of (Owner of CirclePitCaster)) Equal to True))
Unit Group - Pick every unit in CirclePitStopGroup and do (Actions)
Loop - Actions
Set CirclePitStopVictim = (Picked unit)
Set CirclePitPickLoc = (Position of CirclePitStopVictim)
Unit Group - Remove CirclePitStopVictim from CirclePitGroup
Unit - Create 1 Dummy Human (Stand) for (Owner of CirclePitCaster) at CirclePitPickLoc facing Default building facing degrees
Unit - Add Circle Pit Effect (Senth) to (Last created unit)
Unit - Set level of Circle Pit Effect (Senth) for (Last created unit) to (Level of Circle Pit for CirclePitCaster)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Orc Raider - Ensnare CirclePitStopVictim
Custom script: call RemoveLocation(udg_CirclePitPickLoc)
For each (Integer A) from 1 to 16, do (Actions)
Loop - Actions
Set CirclePitPoint[((Integer A) + (CirclePitTimes x 16))] = (CirclePitTargetPoint offset by 365.00 towards (22.50 x (Real((Integer A)))) degrees)
Special Effect - Create a special effect at CirclePitPoint[((Integer A) + (CirclePitTimes x 16))] using Abilities\Spells\Undead\Graveyard\GraveMarker.mdl
Set CirclePitEffect[((Integer A) + (CirclePitTimes x 16))] = (Last created special effect)
Wait 6.00 seconds
Set CirlcePitRegion = No region
For each (Integer B) from 1 to 16, do (Actions)
Loop - Actions
[B]Special Effect - Destroy CirclePitEffect[((Integer B) + (CirclePitTimes x 16))][/B]