HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Destroy Lightning Effects = Crash?

05-05-2007, 08:36 PM#1
Dil999
Edit 2: I modified my third trigger to use dummies, yet it still doesn't work:
Trigger:
Main9
Collapse Events
Time - RuneforceTimer2 expires
Conditions
Collapse Actions
Set TempPoint34[0] = (Position of TriggeringUnit13)
Collapse For each (Integer A) from 1 to (1 + ((Level of Runeforce for TriggeringUnit13) + 0)), do (Actions)
Collapse Loop - Actions
Unit - Create 1 Caster Dummy for (Owner of TriggeringUnit13) at TempPoint34[0] facing Default building facing degrees
Set TempPoint34[(Integer A)] = (TempPoint34[0] offset by 300.00 towards RuneforceReal[(Integer A)] degrees)
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm TempPoint34[(Integer A)]
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint34[0])
Collapse For each (Integer A) from 1 to (1 + ((Level of Runeforce for (Triggering unit)) + 0)), do (Actions)
Collapse Loop - Actions
Custom script: call RemoveLocation(udg_TempPoint34[GetForLoopIndexA()])

Edit: I found the problem; I was trying to move the lightning effects after I killed them. Im still having the problem where no damage is dealt, though, and im struggling to find a way to make the beams deal X damage per second without using a ton of dummies.
Im working on a 'wheel and axle' like spell, which creates several runes around hero hero. The runes rotate around the hero, with beams stretching from the rune to the hero. These beams are suppsoed to damage enemies who pass through them. The problem is, whenever i run Destroy Lightning Effect, my game crashes.
Heres the triggers:

This one activates the spell, initiating all the variables, creating dummies, etc.
Trigger:
Activate5
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Runeforce
Collapse Actions
Set TriggeringUnit13 = (Triggering unit)
Set TempPoint34[0] = (Position of (Triggering unit))
Collapse For each (Integer A) from 1 to (1 + ((Level of Runeforce for (Triggering unit)) + 0)), do (Actions)
Collapse Loop - Actions
Set RuneforceReal[(Integer A)] = ((360.00 / (1.00 + (Real((Level of Runeforce for (Triggering unit)))))) x (Real((Integer A))))
Set TempPoint34[(Integer A)] = (TempPoint34[0] offset by 300.00 towards RuneforceReal[(Integer A)] degrees)
Unit - Create 1 Rune Dummy for (Owner of (Triggering unit)) at TempPoint34[(Integer A)] facing (Angle from TempPoint34[(Integer A)] to (Position of (Triggering unit))) degrees
Unit - Order (Last created unit) to Neutral Dark Ranger - Life Drain (Triggering unit)
Lightning - Create a Mana Drain lightning effect from source TempPoint34[(Integer A)] to target TempPoint34[0]
Set RuneforceLightning[(Integer A)] = (Last created lightning effect)
Set RuneforceDummies[(Integer A)] = (Last created unit)
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
Countdown Timer - Start RuneforceTimer as a Repeating timer that will expire in 0.04 seconds
Countdown Timer - Start RuneforceTimer2 as a Repeating timer that will expire in 0.25 seconds
Wait 10.00 game-time seconds
Collapse For each (Integer A) from 1 to (1 + ((Level of Runeforce for (Triggering unit)) + 0)), do (Actions)
Collapse Loop - Actions
Lightning - Destroy RuneforceLightning[(Integer A)]

This one moves the dummies and lightnig effects around the central axis (TempPoint34[1])
Trigger:
Main8
Collapse Events
Time - RuneforceTimer expires
Conditions
Collapse Actions
Set TempPoint34[0] = (Position of TriggeringUnit13)
Collapse For each (Integer A) from 1 to (1 + ((Level of Runeforce for TriggeringUnit13) + 0)), do (Actions)
Collapse Loop - Actions
Set RuneforceReal[(Integer A)] = (RuneforceReal[(Integer A)] + 1.70)
Set TempPoint34[(Integer A)] = (TempPoint34[0] offset by 300.00 towards RuneforceReal[(Integer A)] degrees)
Unit - Move RuneforceDummies[(Integer A)] instantly to TempPoint34[(Integer A)]
Unit - Move RuneforceDummies[(Integer A)] instantly to TempPoint34[(Integer A)], facing TempPoint34[0]
Lightning - Move RuneforceLightning[(Integer A)] to source TempPoint34[(Integer A)] and target TempPoint34[0]


This one is supposed to oder the dummies to carrion swarm every .3 seconds. This trigger doesnt seem to work, and i dont know why.
Trigger:
Main9
Collapse Events
Time - RuneforceTimer2 expires
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to (1 + ((Level of Runeforce for TriggeringUnit13) + 0)), do (Actions)
Collapse Loop - Actions
Unit - Order RuneforceDummies[(Integer A)] to Undead Dreadlord - Carrion Swarm TempPoint34[0]

I know these leak ALOT, I'm going to fix all these leaks later.