Hello again
Here goes my newbie questions again!
Using Daelin's tutorial ive tried to create something like it xD But theres little problem - strange bug, as i noticed, if number of targets attacked by spell is more thn number of units around, it will use all remaining *jump* (ermm.. i mean.. for example, it has 10 targets, so it will jump 10 times) on the last unit. I need little help to solve this problem
Here comes the code: (Daelin im still your fan )
Here goes my newbie questions again!
Using Daelin's tutorial ive tried to create something like it xD But theres little problem - strange bug, as i noticed, if number of targets attacked by spell is more thn number of units around, it will use all remaining *jump* (ermm.. i mean.. for example, it has 10 targets, so it will jump 10 times) on the last unit. I need little help to solve this problem
Here comes the code: (Daelin im still your fan )
-
Events
- Unit - a unit begins to cast an ability
-
Conditions
- (Ability being cast) equal to Seeking Fire
-
Actions
- Set BM_prev = (Triggering unit)
- Set BM_targ = (Target unit of ability being cast)
- Set BM_targetsnum = 20 [COLOR="Olive"]//number of jumps ^_^[/COLOR]
-
For each (Integer MB_cur) from 1 to MB_targetsnum, do (Actions)
-
Loop - Actions
- Unit Group - add MB_targ to MB_alltargs
- Set MB_TempPoint = (Position of MB_prev)
- Unit - Create 1 Chain Spells Dummy for (Owned of (Triggering Unit)) at MB_TempPoint facing 90.00 degrees
- Custom script: call RemoveLocation(udg_MB_TempPoint)
- Unit - Add Seeking Fire (effect) to (Last created unit) [COLOR="Olive"]//effect spell based on shadow strike[/COLOR]
- Unit - Order (last created unit) to Warden - Shadow Strike MB_targ
- Unit - add 1.50 second Expiration timer to (Last created unit)
- Wait until (((MB_targ has buff Seeking Fire ) equal to True) or ((MB_targ is dead) equal to True), checking every 0.35 seconds
-
if (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (MB_targ is dead) equal to False
-
Then - Actions
- Set MB_TempPoint = (Position of MB_targ)
- Unit - Create 1 Chain Spells Dummy for (Owned of (Triggering Unit)) at MB_TempPoint facing 90.00 degrees
- Custom script: call RemoveLocation(udg_MB_TempPoint)
- Unit - add 1.50 second Expiration timer to (Last created unit)
- Unit - Add Seeking Fire (bolt) to (Last created unit) [COLOR="Olive"]//damaging and stunning spell based on firebolt[/COLOR]
- Unit - Order (last created unit) to Neutral - Firebolt MB_targ
-
Else - Actions
- Set MB_cur = (MB_targetsnum + 1)
-
If - Conditions
-
if (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MB_cur less than MB_targetsnum
-
Then - Actions
- Set MB_prev = MB_targ
- Set MB_Smax = -1.00 [COLOR="Olive"]//erm i dont know what is that xD erm maybe this is mistaken place or something..[/COLOR]
- Set MB_TempPoint = (Position of MB_prev)
- Set MB_TmpGroup = (Units within 500.00 of MB_TemPoint)
-
Unit Group - Pick every unit in MB_TmpGroup and do (Actions)
-
Loop - Actions
-
if (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions
- ((Picked unit) is Building) equal to False
- ((Picked unit) is Mechanical) equal to False
- ((Picked unit) is Immune to magic) equal to False
- ((Picked unit) belongs to enemy of (Owned of (Triggering unit))) equal to True
- ((Picked unit) is dead equal to False
- ((Picked unit) is in MB_Alltargs
-
Then - Actions
- Set MB_targ = (Picked unit)
-
Else - Actions
- Do Nothing
-
if (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions
-
Loop - Actions
-
Else - Actions
- Do Nothing
-
If - Conditions
- Custom script: call RemoveLocation(udg_MB_TempPoint)
- Custom script: call DestroyGroup(udg_MB_TmpGroup)
-
Loop - Actions
- Unit Group - Remove all units from MB_alltargs