• 🏆 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] Need help with a spell.

Status
Not open for further replies.
Level 5
Joined
Jul 14, 2008
Messages
121
I'm trying to create a no target spell, which damage every enemy units(targets) in 500 distance of caster, also damage every enemy units in 250 distance of (targets). Here's my triggers:


  • Darkness Fall Part 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Darkness Fall
    • Actions
      • Set DarknessFallCaster = (Triggering unit)
      • Set DarknessFallLoc = (Position of DarknessFallCaster)
      • Special Effect - Create a special effect attached to the origin of DarknessFallCaster using war3mapImported\Desecrate.mdx
      • Set DarknessFallSFX = (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 500.00 of DarkLightningLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of DarknessFallCaster)) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Set DarknessFallTarget = (Picked unit)
          • Set DarknessFallLoc2 = (Position of DarknessFallTarget)
          • Special Effect - Create a special effect at DarknessFallLoc2 using war3mapImported\Doomsday.mdx
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause DarknessFallCaster to damage DarknessFallTarget, dealing 25.00 damage of attack type Spells and damage type Normal
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 250.00 of DarknessFallLoc2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of DarknessFallCaster)) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Cause DarknessFallCaster to damage (Picked unit), dealing (25.00 x (Real((Level of Darkness Fall for DarknessFallCaster)))) damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation(udg_DarknessFallLoc2)
      • Custom script: call RemoveLocation(udg_DarknessFallLoc)
      • Countdown Timer - Start DarknessFallTimer[1] as a One-shot timer that will expire in 2.00 seconds
      • Countdown Timer - Create a timer window for DarknessFallTimer[1] with title Darkness Fall 1
      • Set DarknessFallCTimer[1] = (Last created timer window)
      • Countdown Timer - Hide DarknessFallCTimer[1]

  • Darkness Fall Part 2
    • Events
      • Time - DarknessFallTimer[1] expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy DarknessFallCTimer[1]
      • Special Effect - Destroy DarknessFallSFX

Sorry for my bad english.

Anyone can help ?
 
Level 9
Joined
Jun 3, 2009
Messages
486
  • Unit - Cause DarknessFallCaster to damage (Picked unit), dealing (25.00 x (Real((Level of Darkness Fall for DarknessFallCaster)))) damage of attack type Spells and damage type Normal
I think that this is you problem

  • Level of Darkness Fall for DarknessFallCaster
Change it to lvl of DarknesFallCaster instead of lvl of ability for unit
 
Level 5
Joined
Jul 14, 2008
Messages
121
All the special effects are destroyed. And how do I use hidden tags ? One is destroy later, because it's an channeling
effect, when it's destroy it disapear. Also, it ain't a channeling spell.

Edit:
@SpEtNeZz:
Ain't working either. Well, the sfx on caster works, but then nothing happen.

Edit2:
Got it working. New triggers:

  • Darkness Fall
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Darkness Fall
    • Actions
      • Set DarknessFallCaster = (Triggering unit)
      • Set DarknessFallLoc = (Position of DarknessFallCaster)
      • Special Effect - Create a special effect at DarknessFallLoc using war3mapImported\Desecrate.mdx
      • Set DarknessFallSFX = (Last created special effect)
      • Countdown Timer - Start DarknessFallTimer[1] as a One-shot timer that will expire in 2.00 seconds
      • Countdown Timer - Create a timer window for DarknessFallTimer[1] with title Darkness Fall 1
      • Set DarknessFallCTimer[1] = (Last created timer window)
      • Countdown Timer - Hide DarknessFallCTimer[1]
      • Trigger - Turn on Darkness Fall Effect <gen>
  • Darkness Fall Effect
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set DarknessFallTarget = (Random unit from (Units within 800.00 of DarknessFallLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of DarknessFallCaster)) Equal to True) a
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DarknessFallTarget Not equal to No unit
        • Then - Actions
          • Set DarknessFallLoc2 = (Position of DarknessFallTarget)
          • Unit Group - Add DarknessFallTarget to DarknessFallGroup
          • Special Effect - Create a special effect at DarknessFallLoc2 using war3mapImported\Doomsday.mdx
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause DarknessFallCaster to damage DarknessFallTarget, dealing 25.00 damage of attack type Spells and damage type Normal
          • Set DarknessFallGroup2 = (Units within 250.00 of DarknessFallLoc2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of DarknessFallCaster)) Equal to True))))
          • Unit Group - Pick every unit in DarknessFallGroup2 and do (Actions)
            • Loop - Actions
              • Unit - Cause DarknessFallCaster to damage (Picked unit), dealing (25.00 x (Real((Level of Darkness Fall for DarknessFallCaster)))) damage of attack type Spells and damage type Normal
              • Unit Group - Remove (Picked unit) from DarknessFallGroup2
          • Set DarknessFallTarget = No unit
          • Custom script: call RemoveLocation(udg_DarknessFallLoc2)
        • Else - Actions
          • Unit Group - Pick every unit in DarknessFallGroup and do (Actions)
            • Loop - Actions
              • Unit Group - Remove (Picked unit) from DarknessFallGroup
          • Custom script: call RemoveLocation(udg_DarknessFallLoc)
          • Trigger - Turn off (This trigger)
  • Darkness Fall Destroying
    • Events
      • Time - DarknessFallTimer[1] expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy DarknessFallCTimer[1]
      • Special Effect - Destroy DarknessFallSFX
 
Last edited:
Status
Not open for further replies.
Top