HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell trigger is not very happy... :(

09-11-2007, 09:14 PM#1
~Void~
My spell trigger doesn't like me. Why not? -_-
Seriously though, I don't see anything wrong with this.
Trigger:
Energy Burn
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Energy Burn
Collapse Actions
Collapse For each (Integer A) from 1 to ((8 + ((Level of Energy Burn for (Triggering unit)) x 2)) + 0), do (Actions)
Collapse Loop - Actions
Wait 1.00 seconds
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (((Real((Level of Energy Burn for (Triggering unit)))) x 10.00) x 10.00) damage of attack type Chaos and damage type Normal
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Intelligence of (Triggering unit) (Include bonuses)) Greater than or equal to ((Hero level of (Triggering unit)) x 10)
Collapse Then - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 5.00 damage of attack type Chaos and damage type Normal
Else - Actions
Special Effect - Create a special effect attached to the head of (Target unit of ability being cast) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl

(i have a feeling it's got something to do with the loop)
09-11-2007, 09:34 PM#2
botanic
(Intelligence of (Triggering unit) (Include bonuses)) Greater than or equal to ((Hero level of (Triggering unit)) x 10)

how does that work :P

also

Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 5.00 damage of attack type Chaos and damage type Normal

5 whole extra dmg zomigod :P

if that isnt the problem then I need more info on what it is doing exactly (generally include that from now on please)
09-11-2007, 10:24 PM#3
rain9441
Using Wait will cause either TriggerUnit or Target unit of ability being cast to become invalid. One or the other, or both, I'm not sure. I never use waits. My guess is that if there is no special effect being shown than "Target unit of ability being cast" is becoming invalid, otherwise TriggerUnit is.

You can probably do the global/local variable trick for a hot fix.

Create a global unit "MyTempTriggerUnit" and a global unit "MyTempTargetUnit"

Then at the beginning (very first line, before you do anything) of this trigger add a custom script
local udg_MyTempTriggerUnit = GetTriggerUnit() and
local udg_MyTempTargetUnit = GetSpellTargetUnit()
Use globals MyTempTriggerUnit and MyTempTargetUnit in the loop. See if it works.
09-11-2007, 10:31 PM#4
~Void~
Quote:
Originally Posted by rain9441
Using Wait will cause either TriggerUnit or Target unit of ability being cast to become invalid. One or the other, or both, I'm not sure. I never use waits. My guess is that if there is no special effect being shown than "Target unit of ability being cast" is becoming invalid, otherwise TriggerUnit is.

You can probably do the global/local variable trick for a hot fix.

Create a global unit "MyTempTriggerUnit" and a global unit "MyTempTargetUnit"

Then at the beginning (very first line, before you do anything) of this trigger add a custom script
local udg_MyTempTriggerUnit = GetTriggerUnit() and
local udg_MyTempTargetUnit = GetSpellTargetUnit()
Use globals MyTempTriggerUnit and MyTempTargetUnit in the loop. See if it works.

It would not be MUI then? But... can I not just convert it to jass and do that with normal locals e.g.
local unit u = GetTriggerUnit()?

EDIT:
Quote:
On the first day the Blizzard programmers created World Edit, and it was good
On the second day the Blizzard programmers created Art Tools, and it was good
On the third day the Blizzard programmers created JASS, and it was good
On the fourth day the Blizzard programmers created GUI, and it was good
On the fifth day the Blizzard programmers created GameCache , and it was good
On the sixth day the Blizzard programmers created all the Abilities and Units of the realm, and it was good
On the seventh day the Blizzard programmers got drunk and created CreateMIDISound, and half of it was forgotten
Hmm... try this fix
On the fourth day the Blizzard programmers created GUI, and it sucked.

Further EDIT.
...GUI, and it sucked, but was good for lazy people like MISSELF... -_-
09-11-2007, 10:52 PM#5
botanic
gui is great when you want the map to display a game message at map init that says "HI" :P
09-12-2007, 12:43 AM#6
Pyrogasm
GetTriggerUnit() works through waits.
GetSpellTargetUnit() does not.

Most other event responses do not carry through waits either.
09-12-2007, 12:36 PM#7
Ghan_04
Integer A and B loops can sometimes bug up when you have waits, as well. I would recommend you use an Integer Variable loop instead.