- Joined
- Apr 11, 2011
- Messages
- 63
i'm making an spell like Meat-Hook in DotA ... i having this problem .. when it cast multiple times it leaves a chain dummy ... i hope you help me with this
here's the trigger ...
Thanks in advance )
here's the trigger ...
-
Constricting Chains
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Constricting Chains
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_Int Equal to 0
-
Then - Actions
- Trigger - Turn on Constricting Chains Extend <gen>
- Else - Actions
-
If - Conditions
- Set ConChains_Int = (ConChains_Int + 1)
- Set ConChains_Counts = (ConChains_Counts + 1)
- Set ConChains_Caster[ConChains_Counts] = (Triggering unit)
- Set ConChains_Level[ConChains_Counts] = (Real((Level of Constricting Chains for ConChains_Caster[ConChains_Counts])))
- Set ConChains_Point[1] = (Position of ConChains_Caster[ConChains_Counts])
- Set ConChains_Point[2] = (Target point of ability being cast)
- Set ConChains_Angle[ConChains_Counts] = (Angle from ConChains_Point[1] to ConChains_Point[2])
- Unit - Create 1 Dummy (Global) for (Owner of ConChains_Caster[ConChains_Counts]) at ConChains_Point[1] facing Default building facing degrees
- Set ConChains_Dummy[ConChains_Counts] = (Last created unit)
- Set ConChains_Link[ConChains_Counts] = 0
- Set ConChains_LinkMax[ConChains_Counts] = (5 + (6 x (Integer(ConChains_Level[ConChains_Counts]))))
- Set ConChains_On[ConChains_Counts] = True
- Custom script: call RemoveLocation(udg_ConChains_Point[1])
- Custom script: call RemoveLocation(udg_ConChains_Point[2])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Constricting Chains Extend
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer ConChains_Loop) from 1 to ConChains_Counts, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_On[ConChains_Loop] Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ConChains_Dummy[ConChains_Loop] is alive) Equal to True
-
Then - Actions
- Set ConChains_Link[ConChains_Loop] = (ConChains_Link[ConChains_Loop] + 1)
- Set ConChains_Point[1] = (Position of ConChains_Dummy[ConChains_Loop])
- Set ConChains_Point[2] = (ConChains_Point[1] offset by (40.00 x (Real(ConChains_Link[ConChains_Loop]))) towards ConChains_Angle[ConChains_Loop] degrees)
- Unit - Create 1 Chilling Touch for (Owner of ConChains_Caster[ConChains_Loop]) at ConChains_Point[2] facing ConChains_Angle[ConChains_Loop] degrees
- Set ConChains_DummyLink[ConChains_Link[ConChains_Loop]] = (Last created unit)
- Set ConChains_Point[3] = (Position of ConChains_DummyLink[ConChains_Link[ConChains_Loop]])
- Set ConChains_HitGroup[ConChains_Loop] = (Random 1 units from (Units within 125.00 of ConChains_Point[3] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is An Ancient) Not equal to True) and ((((Matching u
-
Unit Group - Pick every unit in ConChains_HitGroup[ConChains_Loop] and do (Actions)
-
Loop - Actions
- Set ConChains_Hit[ConChains_Loop] = (Picked unit)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- ConChains_Hit[ConChains_Loop] Not equal to No unit
- ConChains_Link[ConChains_Loop] Greater than or equal to ConChains_LinkMax[ConChains_Loop]
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ConChains_Hit[ConChains_Loop] belongs to an ally of (Owner of ConChains_Caster[ConChains_Loop])) Not equal to True
-
Then - Actions
- Unit - Cause ConChains_Caster[ConChains_Loop] to damage ConChains_Hit[ConChains_Loop], dealing (90.00 x ConChains_Level[ConChains_Loop]) damage of attack type Chaos and damage type Universal
- Special Effect - Create a special effect attached to the chest of ConChains_Hit[ConChains_Loop] using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
- Unit - Kill ConChains_Dummy[ConChains_Loop]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_ConChains_Point[1])
- Custom script: call RemoveLocation(udg_ConChains_Point[2])
- Custom script: call RemoveLocation(udg_ConChains_Point[3])
- Custom script: call DestroyGroup (udg_ConChains_HitGroup[udg_ConChains_Loop])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_Hit[ConChains_Loop] Not equal to No unit
-
Then - Actions
- Set ConChains_Point[4] = (Position of ConChains_DummyLink[ConChains_Link[ConChains_Loop]])
- Unit - Move ConChains_Hit[ConChains_Loop] instantly to ConChains_Point[4]
- Unit - Remove ConChains_DummyLink[ConChains_Link[ConChains_Loop]] from the game
- Set ConChains_Link[ConChains_Loop] = (ConChains_Link[ConChains_Loop] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_Link[ConChains_Loop] Less than or equal to 0
-
Then - Actions
- Set ConChains_Int = (ConChains_Int - 1)
- Set ConChains_On[ConChains_Loop] = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_Int Equal to 0
-
Then - Actions
- Set ConChains_Counts = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Set ConChains_Hit[ConChains_Loop] = No unit
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_ConChains_Point[4])
-
Else - Actions
- Unit - Remove ConChains_DummyLink[ConChains_Link[ConChains_Loop]] from the game
- Set ConChains_Link[ConChains_Loop] = (ConChains_Link[ConChains_Loop] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_Link[ConChains_Loop] Less than or equal to 0
-
Then - Actions
- Set ConChains_Int = (ConChains_Int - 1)
- Set ConChains_On[ConChains_Loop] = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ConChains_Int Equal to 0
-
Then - Actions
- Set ConChains_Counts = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer ConChains_Loop) from 1 to ConChains_Counts, do (Actions)
-
Events
Thanks in advance )