- Joined
- Feb 23, 2015
- Messages
- 243
Hi
I've made simple, theoretically spammable CC ability for my hero, but I have two. or even three, problems with it. When I cast spell multiple times in short time, sometimes nothing happens, and sometimes effect stays there forever. Also, after casting spell more than 4/5 times, it stops slowing units. Second thing is that after I added custom script which destroys group, the group is destroyed permanently and spell is broken forever. Also, when I set unit's movement speed to 0 X default movement speed, unit is slowed, but can move.
I would be grateful for help :-D.
I've made simple, theoretically spammable CC ability for my hero, but I have two. or even three, problems with it. When I cast spell multiple times in short time, sometimes nothing happens, and sometimes effect stays there forever. Also, after casting spell more than 4/5 times, it stops slowing units. Second thing is that after I added custom script which destroys group, the group is destroyed permanently and spell is broken forever. Also, when I set unit's movement speed to 0 X default movement speed, unit is slowed, but can move.
-
WebConfiguration
-
Events
- Map initialization
- Conditions
-
Actions
- Set WebAbility = Web
- Set WebRadius[1] = 150.00
- Set WebRadius[2] = 150.00
- Set WebRadius[3] = 150.00
- Set WebMultiplier[1] = 0.40
- Set WebMultiplier[2] = 0.20
- Set WebMultiplier[3] = 0.00
- Set WebTime[1] = 5.00
- Set WebTime[2] = 5.00
- Set WebTime[3] = 5.00
-
Events
-
WebCast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equals to WebAbility
-
Actions
- Set WebIndex = (WebIndex + 1)
- Set WebCaster[WebIndex] = (Triggering unit)
- Set WebPoint[WebIndex] = (Target point of ability being cast)
- Set WebLevel[WebIndex] = (Level of WebAbility for WebCaster[WebIndex])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WebIndex Equals to 1
-
Then - Actions
- Trigger - Turn on WebLoop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
WebLoop
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
For each (Integer WebLoop) from 1 to WebIndex, do (Actions)
-
Loop - Actions
- Set WebCounter[WebLoop] = (WebCounter[WebLoop] + 1.00)
-
Unit Group - Pick every unit in WebGroup[WebLoop] and do (Actions)
-
Loop - Actions
- Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
- Unit Group - Remove (Picked unit) from WebGroup[WebLoop]
-
Loop - Actions
- Custom script: call DestroyGroup (udg_WebGroup[udg_WebLoop])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WebCounter[WebLoop] Equals to 1.00
-
Then - Akcje
- Special Effect - Create a special effect at WebPoint[WebLoop] using Abilities\Spells\NightElf\Immolation\ImmolationTarget.mdl
- Set WebEffect[WebLoop] = (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WebCounter[WebLoop] Mniejsze (10.00 x WebTime[WebLevel[WebLoop]])
-
Then - Actions
- Unit Group - Add all units of (Units within WebRadius[WebLevel[WebLoop]] of WebPoint[WebLoop] matching (((Matching unit) is Ground Unid) Equals to YES)) to WebGroup[WebLoop]
-
Unit Group - Pick every unit in WebGroup[WebLoop] and do (Actions)
-
Loop - Actions
- Unit - Set (Picked unit) movement speed to (WebMultiplier[WebLevel[WebLoop]] x (Default movement speed of (Picked unit)))
-
Loop - Actions
-
Else - Actions
- Special Effect - Destroy WebEffect[WebLoop]
- Custom script: call RemoveLocation(udg_WebPoint[udg_WebLoop])
- Set WebCounter[WebLoop] = 0.00
- Set WebCaster[WebLoop] = WebCaster[WebIndex]
- Set WebCounter[WebLoop] = WebCounter[WebIndex]
- Set WebEffect[WebLoop] = WebEffect[WebIndex]
- Set WebGroup[WebLoop] = WebGroup[WebIndex]
- Set WebLevel[WebLoop] = WebLevel[WebIndex]
- Set WebPoint[WebLoop] = WebPoint[WebIndex]
- Set WebIndex = (WebIndex - 1)
- Set WebLoop = (WebLoop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- WebIndex Equals to 0
-
Then - Actions
- Trigger - Turn off WebLoop <gen>
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
For each (Integer WebLoop) from 1 to WebIndex, do (Actions)
-
Events