HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell Help

09-24-2007, 05:40 AM#1
The Elite
G'day,
How do you make a spell that drags a unit to you when you cast it on them it over time and follows the exact path back to you as when you casted it.
Like the DotA spell meat hook (Pudge has it)

Thanks
~The Elite
09-24-2007, 06:06 AM#2
botanic
here is an example spell I made that does something like that jsut it moves away not twords. You would need to add 180 to the angle to make it come to you

Trigger:
Shooting Star
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Shooting Star
Collapse Actions
Set UnitArray[2] = (Casting unit)
Set UnitArray[3] = (Target unit of ability being cast)
Set RealArray[1] = 0.00
Set RealArray[2] = (Real((Intelligence of UnitArray[2] (Include bonuses))))
Set RealArray[3] = (Facing of UnitArray[2])
Special Effect - Create a special effect attached to the weapon of UnitArray[2] using Abilities\Spells\Items\AIlb\AIlbSpecialArt.mdl
Set ShootingStarEffect = (Last created special effect)
Unit - Turn collision for UnitArray[3] On
Animation - Play UnitArray[2]'s attack animation
Unit - Turn collision for UnitArray[3] On
Wait 0.30 seconds
Unit - Cause UnitArray[2] to damage UnitArray[3], dealing ((Real((Level of Shooting Star for UnitArray[2]))) x (Real((Intelligence of UnitArray[2] (Include bonuses))))) damage of attack type Magic and damage type Magic
Trigger - Turn on Fly Away <gen>
Wait 0.45 seconds
Trigger:
Fly Away
Collapse Events
Time - Every 0.03 seconds of game time
Conditions
Collapse Actions
Set RealArray[1] = (RealArray[1] + 6.00)
Set PointArray[2] = (Position of UnitArray[3])
Unit - Turn collision for UnitArray[3] On
Unit - Move UnitArray[3] instantly to (PointArray[2] offset by 6.00 towards RealArray[3] degrees)
Special Effect - Create a special effect attached to the chest of UnitArray[3] using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_PointArray[2])
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
RealArray[1] Greater than or equal to RealArray[2]
Collapse Then - Actions
Set PointArray[2] = (Position of UnitArray[3])
Set tempunitgroup = (Units within 320.00 of PointArray[2])
Set PointArray[2] = (Position of UnitArray[3])
Special Effect - Create a special effect attached to the origin of UnitArray[3] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Turn collision for UnitArray[3] On
Set UnitArray[2] = No unit
Set UnitArray[3] = No unit
Special Effect - Destroy ShootingStarEffect
Custom script: call RemoveLocation(udg_PointArray[2])
Trigger - Turn off (This trigger)
Else - Actions
09-24-2007, 06:35 AM#3
The Elite
thank you