Mass life drain

Ducati

Member!
Joined
Aug 14, 2004
Messages
106
Reaction score
0
Location
alaska
Website
Visit site
ok,i wanna have a hero ability that drains the life of all enemy units around the hero.I want there to be 3 levels,
Level 1)drains 50 life per second for 5 seconds and returns half of 'all' life drained back to hero.
Level 2)drains 100 p/s for 5 secs ''''''''''
Level 3)drains 150 p/s for 5 secs ''''''''''

i have no idea of where to start so please help me from start to finish and provide all importent details.

im not sure how i want the spell to look,but im sure i can figure that out on my own.

Thank You in advance.
 

Ducati

Member!
Joined
Aug 14, 2004
Messages
106
Reaction score
0
Location
alaska
Website
Visit site
Posting useless crap like this, demanding a reply, will get you nowhere. Avoid it at all costs. Also, it was a double post. Learn a little patience my friend.

-Frank :cool:
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
I can make the trigger for this, but the effects I am not so sure. I'm not sure you can use Fan of Knives as a base with a duration and the lightning effects the same as Life Drain. Either way;

Variables needed:
A Unit Group variable (I'll call it UnitGroup); number of times needed to drain, (I'll call this n).
A region with width and height equal to the spell's area of effect times two. I'll give it a variable name, Region.
A unit variable to store the casting unit (I'll call it Unit).
An integer array for damage (I'll call it Damage).

2 Triggers needed.

Trigger 1
Events:
Generic Unit Event - Unit begins to cast a spell

Conditions:
Spell is equal to (whatever)

Actions:
Region - Move (Region) to (Position of (Casting Unit))
Unit Group - Pick every unit in (Region) and do multiple actions
If ((Distance between (Casting Unit) and (Picked Unit) is (Less than or equal to (range of spell)) and ((Owner of (Picked Unit) is not an ally of (Owner of (Casting Unit))) Then (Add (Picked Unit) to (Region)) Else (Do Nothing)​
Set (n) = 0
Set (Unit) = (Casting Unit)
Trigger - Run (Trigger 2)

Trigger 2
Events:
Every (1) seconds of game time

Conditions: None

Actions:
If (Conditions) then do multiple actions else do multiple actions
If - Conditions
(n) is less than 5​
Then - Actions
Pick every unit in (UnitGroup) and do multiple actions
Order (Unit) to damage (Picked Unit) for (Damage[(Level of ability for unit (whatever)-1)]) using ... (You finish this)
Set (n) = ((n) + 1)
Else - Actions
Set (Life of (Unit) to ((Life of (Unit) + (Damage[(Level of ability for unit (whatever)-1)] / 2 * (Number of units in (UnitGroup)))
Turn off (this trigger)​

*​
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
Ducati said:
This may sound noobish,but whats a Variables and how do i make one?
Variables are value 'storehouses' that are used to store values.

In the Trigger Editor, hit the X button on the toolbar.*
 

NewPosts

New threads

Top