• 🏆 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!

[Trigger] Spell Problem

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2008
Messages
253
Hey Guys, I have a problem with one of my spells.

Trigger:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Tidal Wrath
  • Actions
    • Set Caster[1] = (Casting unit)
    • Set Damage[1] = ((1.80 x (Real((Strength of Caster[1] (Include bonuses))))) + 3.00)
    • Set Location[1] = (Position of Caster[1])
    • Unit Group - Pick every unit in (Units within 350.00 of Location[1] matching (((Matching unit) belongs to an ally of (Owner of Caster[1])) Equal to False)) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) is alive) Equal to True
          • Then - Actions
            • Unit - Cause Caster[1] to damage (Picked unit), dealing Damage[1] damage of attack type Spells and damage type Normal
          • Else - Actions
    • Set Real[1] = 0.00
    • For each (Integer TWInteger) from 1 to 5, do (Actions)
      • Loop - Actions
        • Set Location[2] = (Location[1] offset by 200.00 towards Real[1] degrees)
        • Special Effect - Create a special effect at Location[2] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
        • Special Effect - Destroy (Last created special effect)
        • Custom script: call RemoveLocation(udg_Location[2])
        • Set Real[1] = (Real[1] + 72.00)
    • Custom script: call RemoveLocation(udg_Location[1])
Problem: The special effect only shops up the first 2 times, although it still does the damage.

(TWInteger = 0 in the Map Init)

Thanks in advance, Quetzalcotl
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
There is nothing wrong with the triggers. Try making the loop with (Integer A) though it won't make much difference but give it a try. Also to make sure that your triggers are right I have made it like this


  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set Location[1] = (Position of Blood Mage 0001 <gen>)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set Location[2] = (Location[1] offset by 200.00 towards real degrees)
          • Special Effect - Create a special effect at Location[2] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_Location[2])
          • Set real = (real + 72.00)
      • Custom script: call RemoveLocation(udg_Location[1])


Try not using an array variable just to decrease the number of variable. Or you could try and increase their size.
 
Last edited:
Status
Not open for further replies.
Top