O
Odin845
Guest
So this spell is impossible to make?
The Beastmaster looses a deafening roar which deals damage and stuns its target. Enemy units near the roar wave take minor damage and have their movement speed and attack rate reduced. Due to the force of the roar, all units between the Beastmaster and his prey are shoved aside, creating an open path.
The Spectre launches a deadly dagger that trails a Shadow Path. Deals damage to the targets in its path. Units hit by the dagger will also trail a Shadow Path. The Spectre becomes phased (gains zero collision) while on the path.
iAmKablam [B said:Odin[/B] - just an idea, but for Far reach ability, maybe try using the object editor to set your hero's range to 9999999, then just use triggers to modify his acquisition range back and forth.
Well I am gonna bump this thread up.
How the spells goin?
Nice Idea, Exide, and done.
3 Triggers
First: The creation of grenade, and to add expiration timer on it. GT is Real Variable, means duration from the grenade thrown to the explosion.
Code:Throw Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Grenade Actions For each (Integer A) from 1 to 12, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Real2[(Integer A)] Less than 0.50 Then - Actions Set Real2[(Integer A)] = 1.00 Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Integer1 Less than 99 Then - Actions Set Integer1 = (Integer1 + 1) Else - Actions Set Integer1 = 1 Set Point1 = (Position of (Casting unit)) Set Point2 = (Target point of ability being cast) Set Real1[Integer1] = 10.00 Set Real4[Integer1] = ((Distance between (Position of (Casting unit)) and (Target point of ability being cast)) / 20.00) Set Integer2[Integer1] = 0 Unit - Create 1 Grenade for Player 1 (Red) at Point1 facing Point2 Custom script: call RemoveLocation(udg_Point1) Custom script: call RemoveLocation(udg_Point2) Set Unit1[Integer1] = (Last created unit) Unit - Add a [B]GT[/B] second Generic expiration timer to (Last created unit)
Second: The Movement, here you can se Random number from blah blah, that's for your random landing site, fix it yourself.
Code:Thrown Events Time - Every 0.05 seconds of game time Conditions Actions For each (Integer A) from 1 to 100, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Real1[(Integer A)] Greater than -11.90 (Unit1[(Integer A)] is alive) Equal to True Then - Actions Set Real3[(Integer A)] = (100.00 - (Real1[(Integer A)] x Real1[(Integer A)])) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Real3[(Integer A)] Less than 0.00 Then - Actions Set Real3[(Integer A)] = (-1.00 x Real3[(Integer A)]) Else - Actions Set Real4[(Integer A)] = (Real4[(Integer A)] x [COLOR="Blue"]([I]Random real number between 0.98 and 1.02[/I][/COLOR])) Set Point1 = (Position of Unit1[(Integer A)]) Animation - Change Unit1[(Integer A)] flying height to (Real3[(Integer A)] x ([COLOR="blue"][I]Random real number between 2.30 and 2.60[/I][/COLOR])) at 10000.00 Unit - Move Unit1[(Integer A)] instantly to (Point1 offset by Real4[(Integer A)] towards ([COLOR="blue"][I]Random real number between ((Facing of Unit1[(Integer A)]) - 3.00) and ((Facing of Unit1[(Integer A)]) + 3.00)) degrees[/I][/COLOR]) Set Real1[(Integer A)] = (Real1[(Integer A)] - ([COLOR="blue"][I]Random real number between 0.85 and 1.25[/I][/COLOR])) Custom script: call RemoveLocation(udg_Point1) Else - Actions Set Real4[(Integer A)] = (Real4[(Integer A)] x ([COLOR="blue"][I]Random real number between 0.60 and 0.70[/I][/COLOR])) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit1[(Integer A)] is alive) Equal to True Then - Actions Set Point1 = (Position of Unit1[(Integer A)]) Unit - Move Unit1[(Integer A)] instantly to (Point1 offset by Real4[(Integer A)] towards (Facing of Unit1[(Integer A)]) degrees) Custom script: call RemoveLocation(udg_Point1) Else - Actions Animation - Change Unit1[(Integer A)] flying height to 0.00 at 300.00 Animation - Change Unit1[(Integer A)]'s animation speed to 0.00% of its original speed Do nothing
Third: The Explosion when the Grenade dies by the expiration timer. the damage is set by the distance of enemy to the explosion. Bold is the Area of Effect, Italic is the Maximum damage, Underlined is the damage/distance.
To get perfect calculation, set AoE : Maximum damage = damage/distance.
Code:Explode Events Unit - A unit Dies Conditions (Unit-type of (Dying unit)) Equal to Grenade Actions Set Point1 = (Position of (Dying unit)) Set UG1 = (Units within [B]150.00[/B] of Point1 matching (((Owner of (Matching unit)) is an enemy of (Owner of (Dying unit))) Equal to True)) Unit Group - Pick every unit in UG1 and do (Actions) Loop - Actions Set Point2 = (Position of (Picked unit)) Unit - Cause (Dying unit) to damage (Picked unit), dealing ([I]50.00[/I] - ((Distance between Point1 and Point2) / [U]3.00[/U])) damage of attack type Chaos and damage type Fire Custom script: call RemoveLocation(udg_Point2) Custom script: call RemoveLocation(udg_Point1) Custom script: call DestroyGroup(udg_UG1)
Enjoy
Simple answer, once actual range is increased ,you cannot decrease it