i have one spell that i have some problems,shoots fireballs at a target,fireballs increase by 1 per lvl,but there is only 1 fireball...!
Code:
Mythical Fireball
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Mythical Fireball
Actions
Set MF_Caster = (Triggering unit)
Set MF_CasterLoc = (Position of MF_Caster)
For each (Integer A) from 1 to (Integer((Real((Level of Mythical Fireball for MF_Caster))))), do (Actions)
Loop - Actions
Unit - Create 1 Dummy Caster for (Owner of MF_Caster) at MF_CasterLoc facing Default building facing (270.0) degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Turn collision for (Last created unit) Off
Set MF_TempPoint = (MF_CasterLoc offset by 250.00 towards (60.00 x (Real((Integer A)))) degrees)
Unit - Move (Last created unit) instantly to MF_CasterLoc, facing MF_TempPoint
Custom script: call RemoveLocation (udg_MF_TempPoint)
Unit - Add Fireball (Warlock) to (Last created unit)
Unit - Set level of Fireball (Warlock) for (Last created unit) to (Level of Mythical Fireball for MF_Caster)
Set MF_TempPoint = (MF_CasterLoc offset by 250.00 towards (Facing of (Target unit of ability being cast)) degrees)
Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
Custom script: call RemoveLocation (udg_MF_TempPoint)
Custom script: call RemoveLocation (udg_MF_CasterLoc)