Problems adding abilities to picked units.

Status
Not open for further replies.
Level 2
Joined
Sep 11, 2004
Messages
15
Can someone please help me, i am trying to make a spell which gives target allies (area effect) a version of critical strike. and then after the spell ends i want all the targets to die.

the idea is they are ripped appart by the chaos magic, but they deal 4x normal damage in the meantime. i wanted to use critical strike because it is an ultimate and i dont want it to be able to be debluffed... also i tried an earlier version with modified inner fire from dummy casters and after a re-cast the 2nd unit died rather than the first.

thanks in advance... here is what i have so far.
Chaos Magic
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Chaos Magic
Actions
Set CM_Caster = (Casting unit)
Unit Group - Pick every unit in (Units within 250.00 of (Target point of ability being cast) matching ((((Matching unit) belongs to an enemy of (Owner of CM_Caster)) Equal to False) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to CM_Target
Unit - Add Chaos Magic (crit strike) to (Matching unit)
Wait 30.00 seconds
Unit - Kill (Matching unit)

if it makes any difference i based the spell of rain of fire.

thanks.
 
Level 3
Joined
Jul 23, 2004
Messages
58
It's been a long time since mapmaking but i think i can help you.

Why not trying this:
Pick every unit in range of casting unit
if picked unit equal to ally of casting unit add unit to unitgroup.
pick every unit of unit in unitgroup YOURGROUP and do loop
loop
<
Unit - add ability
wait 30secs
Unit - kill
<
 
Level 6
Joined
Aug 12, 2005
Messages
205
Chaos Magic
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Chaos Magic
Actions
Set CM_Caster = (Casting unit)
Unit Group - Pick every unit in (Units within 250.00 of (Target point of ability being cast) matching ((((Matching unit) belongs to an enemy of (Owner of CM_Caster)) Equal to False) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to CM_Target
Unit - Add Chaos Magic (crit strike) to (Matching unit)
Wait 30.00 seconds
Unit - Kill (Matching unit)


You don't need to refer to Matching unit in the loop actions, the correct is Picked unit! Matching unit are used only in the matching conditions! :wink:
 
Level 7
Joined
May 6, 2005
Messages
390
$h@dow said:
It's been a long time since mapmaking but i think i can help you.

Why not trying this:
Pick every unit in range of casting unit
if picked unit equal to ally of casting unit add unit to unitgroup.
pick every unit of unit in unitgroup YOURGROUP and do loop
loop
<
Unit - add ability
wait 30secs
Unit - kill
<

Why use two groups? That's totally unneeded.

You can't use waits in ForGroup functions, it crashes the thread, use ExecuteFunc or another trigger.
 
Status
Not open for further replies.
Top