HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

This Trigger. Completely variable

01-30-2004, 03:47 PM#1
Spinally
I made this very simple trigger to shoot some chain lightnings out of every target a forked lightning hits and it should hit 3 (random) units, but sometimes it hits itself (i.e.: The unit where it is standing in) which I specifically triggered them not to and most of the time they dont even get further than 1 shot chain lightning. Whats wrong?

Code:
CN1
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Set CNTargets1[(Integer A)] = (Random unit from (Units within 400.00 of (Position of DummyCaster1) matching ((((Matching unit) belongs to an enemy of (Owner of UCNCastingUnit)) Equal to True) and (((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to CNTarge
                Unit - Order DummyCaster1 to Orc Far Seer - Chain Lightning CNTargets1[(Integer A)]
                Wait 0.50 seconds
                Unit - Move DummyCaster1 instantly to (Position of CNTargets1[(Integer A)])

CN2
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Set CNTargets2[(Integer A)] = (Random unit from (Units within 400.00 of (Position of DummyCaster2) matching ((((Matching unit) belongs to an enemy of (Owner of UCNCastingUnit)) Equal to True) and (((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to CNTarge
                Unit - Order DummyCaster2 to Orc Far Seer - Chain Lightning CNTargets2[(Integer A)]
                Wait 0.50 seconds
                Unit - Move DummyCaster2 instantly to (Position of CNTargets2[(Integer A)])

CN3
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Set CNTargets3[(Integer A)] = (Random unit from (Units within 400.00 of (Position of DummyCaster3) matching ((((Matching unit) belongs to an enemy of (Owner of UCNCastingUnit)) Equal to True) and (((((Matching unit) is A structure) Equal to False) and ((Matching unit) Not equal to CNTarge
                Unit - Order DummyCaster3 to Orc Far Seer - Chain Lightning CNTargets3[(Integer A)]
                Wait 0.50 seconds
                Unit - Move DummyCaster3 instantly to (Position of CNTargets3[(Integer A)])
01-30-2004, 04:25 PM#2
DaKaN
is the dummy caster allied with the forked lighting caster? if not the chain lightning could bounce and hit the caster
01-30-2004, 05:06 PM#3
Spinally
Yes it is on the same team.