Events: Unit starts the effect of an ability
Conditions: Ability being cast equal to (Storm Bolt)
Actions: If: Level of (Multicast) for (Casting unit) equal to 1
Then: [B]Set GeneralPoint equal to (Position of (Casting unit))
Create 1 Dummy Caster at (GeneralPoint) for (Owner of (Casting unit)) facing default building facing degrees
Add a 3.00 second expiration timer to (Last created unit)
Add (Dummy Storm Bolt) to (Last created unit)
Set level of (Dummy Storm Bolt) for (Last created unit) equal to (Level of (Multicast) for (Casting unit))
Order (Last created unit) to (Human Mountain King -- Storm Bolt) (Target unit of ability being cast)
call RemoveLocation(udg_GeneralPoint)[/B]
Multicast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fireblast
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Multicast for (Casting unit)) Equal to 1
Then - Actions
Set MulticastCaster = (Casting unit)
Unit - Create 1 Dummy Caster for (Owner of MulticastCaster) at (Position of MulticastCaster) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Fireblast to (Last created unit)
Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for MulticastCaster)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
Custom script: call RemoveLocation(udg_MulticastCaster)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Multicast for (Casting unit)) Equal to 3
Then - Actions
Set MulticastCaster = (Casting unit)
Unit - Create 1 Dummy Caster for (Owner of MulticastCaster) at (Position of MulticastCaster) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Fireblast to (Last created unit)
Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for MulticastCaster)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
Custom script: call RemoveLocation(udg_MulticastCaster)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Multicast for (Casting unit)) Equal to 3
Then - Actions
Set MulticastCaster = (Casting unit)
Unit - Create 1 Dummy Caster for (Owner of MulticastCaster) at (Position of MulticastCaster) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Fireblast to (Last created unit)
Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for MulticastCaster)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
Custom script: call RemoveLocation(udg_MulticastCaster)
Else - Actions
Test
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A structure) Equal to True
Then - Actions
Do nothing
Do nothing
Do nothing
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A structure) Equal to True
Then - Actions
Do nothing
Do nothing
Do nothing
Else - Actions
I think a much easier way is to make several dummy units for example lvl 1 as u said u want to be casted 2 times, level2 to be casted 4 times and level3 to be casted 7 times... I think u could make 1 dummy unit for the first lvl, 3 dummy units for the second lvl and 6 dummy units for the third lvl. Ofcourse add ur ability to them and order them to cast it... Don't think that it won't lag but try u haven't got anything to lose... GOOD LUCK
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set MulticastCaster = (Casting unit)
Unit - Create 1 Dummy Caster for (Owner of MulticastCaster) at (Position of MulticastCaster) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Fireblast to (Last created unit)
Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for MulticastCaster)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
---And you fix the leak (Position of MulticastCaster)---
call RemoveLocation(udg_MulticastCaster)
You need to do a loop like so
(just change the 10 to the number of repeat casts you want)
Code:For each (Integer A) from 1 to 10, do (Actions) Loop - Actions Set MulticastCaster = (Casting unit) Unit - Create 1 Dummy Caster for (Owner of MulticastCaster) at (Position of MulticastCaster) facing Default building facing degrees Unit - Add a 3.00 second Generic expiration timer to (Last created unit) Unit - Add Fireblast to (Last created unit) Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for MulticastCaster) Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast) ---And you fix the leak (Position of MulticastCaster)---
You can add a wait at the end of the loop if you want a delay between each recast, otherwise it'll just be one big, instant effect
And you are getting script errors because
JASS:call RemoveLocation(udg_MulticastCaster)
MulticastCaster is a unit, but RemoveLocation needs to take a point and units =/= points
Multicast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fireblast
(Level of Multicast for (Casting unit)) Equal to 1
Actions
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Set FireblastCaster = (Casting unit)
Unit - Create 1 Dummy Caster for (Owner of FireblastCaster) at (Position of FireblastCaster) facing Default building facing degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Unit - Add Fireblast to (Last created unit)
Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for FireblastCaster)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
Does the dummy have enough mana/spell have 0 mana cost?
Casting range of the dummy spell?
Is Fireblast based on the Firebolt ability? If not, that order won't work
Multicast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fireblast
(Level of Multicast for (Casting unit)) Equal to 1
Actions
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Set FireblastCaster = (Casting unit)
Unit - Create 1 Dummy Caster for (Owner of FireblastCaster) at (Position of FireblastCaster) facing Default building facing degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Unit - Add Fireblast to (Last created unit)
Unit - Set level of Fireblast for (Last created unit) to (Level of Fireblast for FireblastCaster)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)