• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] How is this spell?

Status
Not open for further replies.
Hey, guys! I want to know this spell is good or bad?:
  • EluneBolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Elune Bolt
    • Actions
      • Set Targ_Unit = (Target unit of ability being cast)
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Targ_Point = (Position of (Target unit of ability being cast))
      • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
      • Set Effect01 = (Last created special effect)
      • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl
      • Set Effect02 = (Last created special effect)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Lightning Orb for Player 1 (Red) at Temp_Point facing Default building facing degrees
          • Set Unit01 = (Last created unit)
          • Unit - Create 1 Lightning Orb for Player 1 (Red) at Targ_Point facing Default building facing degrees
          • Unit - Kill Unit01
          • Set Unit02 = (Last created unit)
          • Unit - Kill Unit02
      • Lightning - Create a Chain Lightning - Primary lightning effect from source Temp_Point to target Targ_Point
      • Set Lightning = (Last created lightning effect)
      • Wait 0.05 seconds
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit01 is dead) Equal to True
          • (Unit02 is dead) Equal to True
        • Then - Actions
          • For each (Integer A) from 1 to 30, do (Actions)
            • Loop - Actions
              • Sound - Play LightningBolt1 <gen> at 100.00% volume, located at Targ_Point with Z offset 0.00
              • Special Effect - Create a special effect at Targ_Point using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
              • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (1000000000.00 x (Percentage life of Targ_Unit)) damage of attack type Spells and damage type Magic
          • For each (Integer A) from 1 to 16, do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect at Targ_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Destroy Effect01
              • Special Effect - Destroy Effect02
          • Special Effect - Create a special effect at Targ_Point using Abilities\Spells\Other\Doom\DoomDeath.mdl
          • Lightning - Destroy Lightning
        • Else - Actions
 
Last edited:

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
There is an empty loop:
  • For each (Integer A) from 1 to 5, do (Actions)
    • Loop - Actions
You should destroy these effects at some point.
  • Special Effect - Create a special effect at Targ_Point using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
  • Special Effect - Create a special effect at Targ_Point using Abilities\Spells\Other\Doom\DoomDeath.mdl
You are destroying these effects in a loop which runs 16 times
  • Special Effect - Destroy Effect01
  • Special Effect - Destroy Effect02
You are using a wait. -> not MUI
  • Wait 0.05 seconds
You are refering to Target unit of ability being cast after the wait.
You should use Targ_Unit instead.
  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (1000000000.00 x (Percentage life of Targ_Unit)) damage of attack type Spells and damage type Magic
You should remove Temp_Point and Targ_Point.
  • Custom script: call RemoveLocation(udg_Temp_Point)
  • Custom script: call RemoveLocation(udg_Targ_Point)
Does this trigger need to be MUI?
Are you using the variables Unit01,Unit02,Targ_Unit,Targ_Point,Temp_Point,Effect01,Effect02 in a different trigger as well? Because of the wait this could cause problems.
You should try to generally avoid using waits in spells.
 
Last edited:

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
MUI means Multi-Unit-Instancability. A spell that is MUI can be cast by multiple units at the same time.
A spell that is not MUI will be buggy if casted by multiple units at the same time, because of variables being overriden.
So the question is whether your spell will be only used by one hero/unit from one player or if there can be multiple units with this spell at the same time on the map.

Is this spell for a multiplayer map?

Why are you using a condition to check if Unit01 and Unit02 are dead, if you have killed them before?
 
MUI means Multi-Unit-Instancability. A spell that is MUI can be cast by multiple units at the same time.
A spell that is not MUI will be buggy if casted by multiple units at the same time, because of variables being overriden.
So the question is whether your spell will be only used by one hero/unit from one player or if there can be multiple units with this spell at the same time on the map.
This spell is for one hero.
Why are you using a condition to check if Unit01 and Unit02 are dead, if you have killed them before?
I put that cuz the trigger had some problems and when I put that condition, that problem has been fixed. This was a wierd problem!
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Have you tested your spell already and are you satisfied with the result ? Do the special effects work as you want it?

If so I would ask if you could send me a map with this spell. This would make it easier for me, because it's quite hard to talk about a spell, if you do not know how the spell performs ingame.
 
Status
Not open for further replies.
Top