• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Multiple Custom Triggered Abilities Not Working

Status
Not open for further replies.
Level 6
Joined
Apr 27, 2006
Messages
186
Here's the only abilities left in the map that I'm making that don't work. Of course I'm not expecting you to help me with all of these spells, just 1 is ok.

--------
Spell 1
--------

Base Ability:
Berserk

Description:
Causes the caster to turn permanently invisible every 8/7/6/5 seconds for 1/2/3/4 seconds. Lasts 36/45/54/63 seconds.

Trigger:
Phase
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Phase
Actions
Set PhasingUnit = (Triggering unit)
For each (Integer A) from 1 to Level of Phase for PhasingUnit + 3, do (Actions)
Loop - Actions
Wait (9.00 - (Real((Level of Phase for PhasingUnit)))) seconds
Unit - Add Permanent Invisibility to PhasingUnit
Wait (Real((Level of Phase for PhasingUnit))) seconds
Unit - Remove Permanent Invisibility from PhasingUnit

Problem:
No matter the level, the invisibility is only added for one interval (for example instead of turning the caster invisible every 5 seconds for 2 seconds, it initially turns the caster invisible for 2 seconds, then it doesnt do anything)

--------
Spell 2
--------

Base Ability:
Flame Strike

Description:
Heals allied units and damages enemy units in a target area for the caster's intelligence * the number of buffs he has * 2. The area increases with each level.

Trigger:
Predict
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Predict
Actions
Unit Group - Pick every unit in (Units within (100.00 x (Real((Level of Predict for (Triggering unit))))) of (Position of (Triggering unit)) matching (((Matching unit) is alive) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
Then - Actions
Unit - Cause (Triggering unit) to damage (Picked unit), dealing (2.00 x ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x (Real((Number of All buffs considered Magic or physical on (Triggering unit) (Include expiration timers, Include auras)))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\ThornsAura\ThornsAura.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (2.00 x (Real((2 x (Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)))))))
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\Polymorph\PolyMorphDoneGround.mdl
Special Effect - Destroy (Last created special effect)

Problem:
Although the trigger looks very ugly, the problem is quite simple. The special effects are created on all of the correct units, but the units aren't healed or damage, is the problem maybe with the "count buffs" command? Because I have never used it before this).


--------
Spell 3
--------

Base Ability:
Flame Strike

Description:
Curses units in a target area, causing them to take 3/6/9 times the Caster's intelligence whenever they attack or cast a spell. Lasts 10/20/30 seconds.

Trigger 1:
Dark Curse Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dark Curse
Actions
Set DarkCurser = (Triggering unit)
Set Interger1 = 0
Unit Group - Pick every unit in (Units within 410.00 of (Target point of ability being cast) matching (((Owner of (Triggering unit)) is an enemy of (Owner of (Matching unit))) Equal to True)) and do (Actions)
Loop - Actions
Set Interger1 = (Interger1 + 1)
Unit Group - Add (Picked unit) to DarkCursedUnits
Set Interger1 = 0
Wait (10.00 x (Real((Level of Dark Curse for DarkCurser)))) seconds
Unit Group - Remove all units from DarkCursedUnits

Trigger2:
Dark Curse Unit Spells
Events
Unit - A unit Finishes casting an ability
Conditions
((Casting unit) is in DarkCursedUnits) Equal to True
Actions
Unit - Cause DarkCurser to damage (Casting unit), dealing (3.00 x (Real((Intelligence of DarkCurser (Include bonuses))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
Special Effect - Destroy (Last created special effect)

Trigger3:
Dark Curse Unit Attacks
Events
Unit - A unit Is attacked
Conditions
((Attacking unit) is in DarkCursedUnits) Equal to True
Actions
Unit - Cause DarkCurser to damage (Attacking unit), dealing (3.00 x (Real((Intelligence of DarkCurser (Include bonuses))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Attacking unit)) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
Special Effect - Destroy (Last created special effect)

Problem:
This spell works, but it causes immense lag which makes the game impossible to play for the duration of the spell. I believe this lag is somehow exponential but I am not sure. Can anyone tell me how to make this spell not lag?


--------
Spell 4
--------

Base Ability:
War Stomp

Description:
Creates 1-2/4/6 Frost Blasts around the caster, each one doing 100/250/400 damage to nearby enemy units, and slowing their attack speeds and movement speeds by the number of blasts times 10% for 4 times the number of blasts in seconds.

Trigger:
Frost Blasts
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Frost Blasts
Actions
Set FrostBlaster = (Triggering unit)
Set NumberofFrostBlasts = (Random integer number between 1 and (2 x (Level of Frost Blasts for (Triggering unit))))
For each (Integer A) from 1 to NumberofFrostBlasts, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 15, do (Actions)
Loop - Actions
Game - Display to (All players) the text: (Don't Worry This is Just for Testing + (String((Integer A))))
Special Effect - Create a special effect at (Random point in (Region centered at (Position of FrostBlaster) with size (500.00, 500.00))) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at (Random point in (Region centered at (Position of FrostBlaster) with size (500.00, 500.00))) using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Pick every unit in (Units within 500.00 of (Position of FrostBlaster) matching (((Owner of (Matching unit)) is an enemy of (Owner of FrostBlaster)) Equal to True)) and do (Actions)
Loop - Actions
Unit - Cause FrostBlaster to damage (Picked unit), dealing (100.00 + (150.00 x ((Real((Level of Frost Blasts for (Triggering unit)))) - 1.00))) damage of attack type Spells and damage type Normal
Unit - Add Frost Blast Negative Bonuses to (Picked unit)
Unit - Set level of Frost Blast Negative Bonuses for (Picked unit) to NumberofFrostBlasts
Wait 2.00 seconds
Wait ((Real(NumberofFrostBlasts)) x 4.00) seconds
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Unit - Remove Frost Blast Negative Bonuses from (Picked unit)
Set NumberofFrostBlasts = 0

Problem:
The problem with this spell is that no matter what the level of frostblasts, it fires 1-2 frost blasts.

--------
Spell 5
--------

Base Ability:
Shadow Strike

Description:
Deals 150/300/450 instant damage to the target, then dealing 25/55/90 damage to that unit every second for 15 seconds. At the end of the duration, the target will radiate, dealing 20/70/120 damage a second to all nearby units for 10 seconds.

Trigger:
Radiation Poisoning
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Radiation Poisoning
Actions
Set RadiationPoisonedUnit = (Target unit of ability being cast)
Set RadiationPoisoningCaster = (Triggering unit)
Wait 15.00 seconds
Unit - Create 1 Radiator for (Owner of RadiationPoisoningCaster) at (Position of RadiationPoisonedUnit) facing Default building facing degrees
Unit - Set level of Radiation (Neutral Hostile 1) for (Last created unit) to (Level of Radiation Poisoning for RadiationPoisoningCaster)
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)

Problem:
Again the problem is very simple, the dummy with the radiation poisoning aura (made out of immolation) is removed before the 10 seconds generic expiration timer is up.

Thanks in advance for your help!
 
Level 11
Joined
Jul 12, 2005
Messages
764
I only have ideas, what the problems could be, but I'm not sure, cause at first look all your triggers seem to work.

Ability #1: I don't know why the loop doesn't go off 5 times, i have no idea. Just a note, if you add Permanent Invisibility, it's Duration field means the fading time. So if you want the unit to disappear immediately, set uration to 0.01 (maybe you can set it to 0, but i'm not sure).

Ability #2: I only have some remarks about it, for exapmle, when you damage enemies, you INCLUDE expiration timers, while the healing doesn't. Also " (2.00 x (Real((2 x (Number of All buffs..." is confusing.

Ability #3: This could be done much simpler if you use Howl of Terror as the base ability (it has a buff). Store the caster as in your first trigger, then:
Code:
Event:
Unit is attacked
Cond:
(Attacking Unit has buff Dark Curse) equal to true
Action
...
Same with casting!

Ability #4: I'm too lazy to analize it, sry...

Ability #5: The dummy must be there! But it stands in place. Make a loop, and move the dummy every 0.1 sec to the position of the RadiatingUnit.
 
Level 2
Joined
Mar 29, 2006
Messages
24
maybe this is a stupid answer but can your "radiator" hit himself with that radiation aura? because maybe it kills himself then before the timer stops :)

PS: maybe it cant hit himself then i got no idea
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Did the first 2 so far.

#1) should work, but the GUI loops get buggy sometime. Make sure you arent using Integer A anywhere elese.

#2) I cant see a problem, but try displaying the value of that whole Number of Buffs on Picked Unit, etc, etc. I should note that if the unit has no buffs, it will deal no damage.
 
Level 6
Joined
Apr 27, 2006
Messages
186
Ability #1: I don't know why the loop doesn't go off 5 times, i have no idea. Just a note, if you add Permanent Invisibility, it's Duration field means the fading time. So if you want the unit to disappear immediately, set uration to 0.01 (maybe you can set it to 0, but i'm not sure).
Ya I know, thanks for the help but I had that already, but seriously thanks for your effort.

Ability #2: I only have some remarks about it, for exapmle, when you damage enemies, you INCLUDE expiration timers, while the healing doesn't. Also " (2.00 x (Real((2 x (Number of All buffs..." is confusing.
I know about the expiration timer bug, but when I got desperate when it wasn't working, I added that just in case, because it doesn't really matter as heros in my game can't get expiration timers. Again thx for the attempt.

Ability #3: This could be done much simpler if you use Howl of Terror as the base ability (it has a buff). Store the caster as in your first trigger, then:
Code:
Event:
Unit is attacked
Cond:
(Attacking Unit has buff Dark Curse) equal to true
Action
...
I guess it would make it easier, but the problem is I want it to affect units in a TARGET area, and I'm not 100% sure this would help the lag. Again thx for the effort.

Ability #5: The dummy must be there! But it stands in place. Make a loop, and move the dummy every 0.1 sec to the position of the RadiatingUnit.
I'm not 100% sure exactly what you mean, but the dummy has it's movement disabled so I don't have to move it, it just stays at the corpse. Thx again for trying.

maybe this is a stupid answer but can your "radiator" hit himself with that radiation aura? because maybe it kills himself then before the timer stops
That very well may have been my bug, but it wasn't, thx for the help though.

#1) should work, but the GUI loops get buggy sometime. Make sure you arent using Integer A anywhere elese
.
Well almost all of my triggered abilities use Integer A, so what should I do? Switch them all to For Each Integer Variable? Thx for the help.

#2) I cant see a problem, but try displaying the value of that whole Number of Buffs on Picked Unit, etc, etc. I should note that if the unit has no buffs, it will deal no damage.
But if it deals no damage, then thats pretty much the problem I'm having right now, just a way to make sure it really does no damage i guess...

As a final note for my loops, I tried to display messages within them. One time the loop was from 1 - 9. and the message displayed 1, then 9 instead of displaying 1,2,3,4,5,6,7,8,9 myb that can help someone figure out why it doesn't work :p.
 
Level 6
Joined
Apr 27, 2006
Messages
186
Because of Purplepoots helpful advice spells 1 and 4 now work bu 2, 3, and 5 don't.
 
Level 6
Joined
Apr 27, 2006
Messages
186
Na, someone thought that already, and I chekced the radiation targets : Enemy, Ground, Neutral, Organic, Not Self. As well the Dummy's hit points are 50000 and it is invulnerable. Maybe I somehow gave it an expiration timer.
 
Status
Not open for further replies.
Top