HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger not working

04-29-2007, 01:56 AM#1
Dil999
Im working on a spell which is supposed to do this: Fires X arrows from the point of the caster, which land on the targeted area and explode, dealing 75 initial damage and 150 damage over 10 seconds.
For some reason, it does the effect of the arrows firing, but nothing else.

Trigger:
Activation
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Burning Volleys
Collapse Actions
Set TriggeringUnit5 = (Triggering unit)
Animation - Change TriggeringUnit5's animation speed to 300.00% of its original speed
Set TempPoint10 = (Target point of ability being cast)
Collapse For each (Integer A) from 1 to (6 + ((Level of Burning Volleys for TriggeringUnit5) x 2)), do (Actions)
Collapse Loop - Actions
Unit - Create 1 Fire Dummy(attacker) for (Owner of TriggeringUnit5) at (Position of TriggeringUnit5) facing Default building facing degrees
Set VolleysDummy[(Integer A)] = (Last created unit)
Set TempPoint9 = (TempPoint10 offset by (Random real number between 0.00 and 400.00) towards (Random angle) degrees)
Set TempPoint28[(Integer A)] = TempPoint9
Unit - Order VolleysDummy[(Integer A)] to Neutral Alchemist - Healing Spray TempPoint9
Custom script: call RemoveLocation( udg_TempPoint9 )
Wait 0.80 game-time seconds
Collapse For each (Integer A) from 1 to (6 + ((Level of Burning Volleys for TriggeringUnit5) x 2)), do (Actions)
Collapse Loop - Actions
Unit - Order VolleysDummy[(Integer A)] to Human Blood Mage - Flame Strike TempPoint28[(Integer A)]
Wait 0.50 game-time seconds
Collapse For each (Integer A) from 1 to (6 + ((Level of Burning Volleys for TriggeringUnit5) x 2)), do (Actions)
Collapse Loop - Actions
Custom script: call RemoveLocation(udg_TempPoint28[GetForLoopIndexA()])
Custom script: call RemoveLocation( udg_TempPoint10 )
Collapse Unit Group - Pick every unit in UnitGroup9 and do (Actions)
Collapse Loop - Actions
Unit - Remove (Picked unit) from the game
Custom script: call DestroyGroup(udg_UnitGroup9)
Custom script: set udg_UnitGroup9 = CreateGroup()
Animation - Change TriggeringUnit5's animation speed to 100.00% of its original speed

The spell used in the first loop is the arrow, and the spell used in the second loop is flamestrike.
04-29-2007, 03:29 AM#2
Zwan
I think these:

Trigger:
Set TempPoint28[(Integer A)] = TempPoint9
Custom script: call RemoveLocation( udg_TempPoint9 )

Are conflicting with this:

Trigger:
Unit - Order VolleysDummy[(Integer A)] to Human Blood Mage - Flame Strike TempPoint28[(Integer A)]
04-29-2007, 05:01 AM#3
Dil999
hmm.. why do you think those would be conflicting? after temppoint28[] is created, it doesn't matter what heppens to temppoint9.
04-29-2007, 05:39 AM#4
Zwan
because it looks like TempPoint28[] is being cleared before the flamestrike is ordered. Everything else seems ok, thats the only thing I see offhand that might be causing the flamestrike to fizzle.
04-29-2007, 05:52 AM#5
Dil999
Trigger:
Custom script: call RemoveLocation(udg_TempPoint28[GetForLoopIndexA()])
This is the line removing temppoint28
04-29-2007, 10:55 AM#6
blu_da_noob
Zwan is correct.
Trigger:
Set TempPoint9 = (TempPoint10 offset by (Random real number between 0.00 and 400.00) towards (Random angle) degrees)
Set TempPoint28[(Integer A)] = TempPoint9

You set TempPoint28 TO TempPoint9, which means they are pointing to the same handle. So when you remove TempPoint9, TempPoint28 now points to a removed handle.
To fix the spell you can just remove this line:
Trigger:
Custom script: call RemoveLocation( udg_TempPoint9 )
You still are doing more than you have to (using the extra variable isn't necessary, but we're in GUI here so efficiency is a relative thing). And choose some better variable names in future ?_?.
04-29-2007, 04:59 PM#7
Dil999
My map currently has about 100 variables, i like to keep them generic -.-'
Thanks, I didnt realize that setting a variable to a variable acts like that, ill just have to change the position of that line.
EditL The Reason why its so messy is because its actually a modification of another ability. It was originally just firing the arrows, and I tried to add in the explosions without touching the basic trigger.