- Joined
- Jun 13, 2008
- Messages
- 350
I'm trying to make a channeling spell which hero can moves while doing it. everything is ok but this:
this is the periodic event of my spell
1. second- -%15 reduction
2. second- -%30 reduction
3. second- -%45 reduction..and so on....at the -%75 state I want them freezed for 6 seconds. btw, if an unit gets out of the spell range when its at for example -%30 state, the buff still gonna take long for like 3 seconds.
this is the periodic event of my spell
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- -------- Loop through the unit group of the example spell. --------
-
Unit Group - Pick every unit in SUPER_DOOPER_GROUP and do (Actions)
-
Loop - Actions
- -------- Select the picked unit. --------
- Set HANDLE_INDEX_UNIT = (Picked unit)
- -------- Get the index of the picked unit. --------
- Custom script: set udg_HANDLE_INDEX_OBJECT=udg_HANDLE_INDEX_UNIT
- Trigger - Run HANDLE_INDEX_GETID (ignoring conditions)
- -------- Generic example spell stuff. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SUPER_DOOPER_TIME[HANDLE_INDEX_ID] Greater than 0.00
-
Then - Actions
- -------- Substract one second... --------
- Set SUPER_DOOPER_TIME[HANDLE_INDEX_ID] = (SUPER_DOOPER_TIME[HANDLE_INDEX_ID] - 1.00)
- -------- Get the position of the caster... --------
- Set TempLoc = (Position of (Picked unit))
- Set TempUnit = (Picked unit)
- -------- Create the tunderclap effect. --------
- -------- Get all units in the near of your caster. --------
- Custom script: set bj_wantDestroyGroup=true
-
Unit Group - Pick every unit in (Units within 250.00 of TempLoc) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of TempUnit) is an enemy of (Owner of (Picked unit))) Equal to True
-
Then - Actions
- Unit - Cause TempUnit to damage (Picked unit), dealing 25.00 damage of attack type Spells and damage type Normal
- Unit - Set (Picked unit) movement speed to ((Current movement speed of (Picked unit)) - (((Current movement speed of (Picked unit)) x 15.00) / 100.00))
- Else - Actions
-
If - Conditions
- Unit - Set (Picked unit) movement speed to 300.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TempLoc)
-
Else - Actions
- -------- Remove unit from the unit group of the example spell. --------
- -------- No need to clean anything up. --------
- Unit - Set (Picked unit) movement speed to 300.00
- Unit Group - Remove (Picked unit) from SUPER_DOOPER_GROUP
-
If - Conditions
-
Loop - Actions
- -------- Turn the trigger off if there aren't any units in the unit group. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in SUPER_DOOPER_GROUP) Equal to 0
-
Then - Actions
- Special Effect - Destroy SpecialEffect[HANDLE_INDEX_ID]
- Special Effect - Destroy SpecialEffect[(HANDLE_INDEX_ID + 1)]
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
1. second- -%15 reduction
2. second- -%30 reduction
3. second- -%45 reduction..and so on....at the -%75 state I want them freezed for 6 seconds. btw, if an unit gets out of the spell range when its at for example -%30 state, the buff still gonna take long for like 3 seconds.