HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggered Spell with Lightning Effect Failing

03-29-2006, 09:59 PM#1
Nasai
basically i want an aoe spell that will create chain lightning animations that start in the center of the aoe area and end at any enemy units in the area of effect. here's my trigger:
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to shock
Collapse Actions
Unit Group - Pick every unit in (Units within 100.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Lightning - Create a Chain Lightning - Primary lightning effect from source (Target point of ability being cast) to target (Position of (Matching unit))

when i test the spell and use it on an enemy unit it will create a lightning effect from the unit it is used on (and only if the unit is in the direct center of the aoe) to the center of the map. any ideas?
03-29-2006, 11:02 PM#2
TaintedReality
"Position of matching unit."

Should be position of picked unit.

Edit: A few other things I just thought of:
1. You need to store every lightning effect you create to a variable or it will leak. But, your group and locations in that trigger are also leaking so I'm guessing you don't care about leaks.

2. The lightning effect is going to stay there permanently unless you destroy it later, which you probably don't want. So again, you're going to have to store every lightning effect to a variable.

3. The lightning is simply going to go from the center of the area to where the enemy units in the area are at that time, so it won't attach to them. That makes it look kinda bad because the lightning just stays still while the units it's supposedly hitting are moving around.
03-30-2006, 12:03 AM#3
PipeDream
Try this: http://www.wc3jass.com/viewtopic.php?t=2074
03-30-2006, 01:34 AM#4
Nasai
Quote:
Originally Posted by TaintedReality
"Position of matching unit."

Should be position of picked unit.

Edit: A few other things I just thought of:
1. You need to store every lightning effect you create to a variable or it will leak. But, your group and locations in that trigger are also leaking so I'm guessing you don't care about leaks.

2. The lightning effect is going to stay there permanently unless you destroy it later, which you probably don't want. So again, you're going to have to store every lightning effect to a variable.

3. The lightning is simply going to go from the center of the area to where the enemy units in the area are at that time, so it won't attach to them. That makes it look kinda bad because the lightning just stays still while the units it's supposedly hitting are moving around.

1. i certainly dont want leaks, i'm just nto too familiar with them. could you tell me how to prevent leaks with locations and anything else that might cause leaks? also, when i set every lightning effect to a variable, am i going to add a line after every effect and set "last created effect" to a variable and then use destroy effect on the variable later? once again, im a noob as far as leaks so any help would be appreciated.

3. any suggestions for solving this problem?