• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Wierd Problem. I really need help.

Status
Not open for further replies.
Level 8
Joined
Jun 18, 2007
Messages
214
I have a problem that I can't explain. This spell should create a dummy unit and order it to move to location. When it reaches an enemy unit it should explode dealing damage. Now the real problem is that it's working! But only the first time casted... If any hero casted it after that (no matter how much I waited) it's as if the Flaming Path loop is totally Disabled. Dummy unit moves and expires after it's duration but it doesn't want to explode when it reaches a unit like it should and it did the first time casted. If anyone can help, please do I worked over this whole night and I still can't understand what the hell is wrong. Thank you!

The starting trigger:

  • Begins
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Blaze
    • Actions
      • Set FB_Caster = (Casting unit)
      • Set FB_Angle = (Facing of FB_Caster)
      • Set FB_Duration = (1.00 + (Real((Level of Fire Blaze for FB_Caster))))
      • Set FB_Point = (Position of FB_Caster)
      • Set FB_Point1 = ((Position of FB_Caster) offset by 2500.00 towards FB_Angle degrees)
      • Unit - Create 1 Mother Flame for (Owner of FB_Caster) at FB_Point facing FB_Angle degrees
      • Set FB_Bolt = (Last created unit)
      • Unit - Set level of Mother Flame Immolation (FB dummy) for FB_Bolt to (Level of Fire Blaze for FB_Caster)
      • Unit - Order FB_Bolt to Move To FB_Point1
      • Unit - Add a FB_Duration second Generic expiration timer to FB_Bolt
      • Custom script: call RemoveLocation(udg_FB_Point)
      • Custom script: call RemoveLocation(udg_FB_Point1)
      • Countdown Timer - Start FB_Timer as a Repeating timer that will expire in 0.03 seconds
      • Custom script: set udg_FB_Caster = null
      • Set FB_Angle = 0.00
      • Set FB_Duration = 0.00
And the timer loop:

  • Flaming Path
    • Events
      • Time - FB_Timer expires
    • Conditions
    • Actions
      • Selection - Remove FB_Bolt from selection for (Owner of FB_Bolt)
      • Unit Group - Pick every unit in (Units within 250.00 of (Position of FB_Bolt) matching ((((Matching unit) belongs to an enemy of (Owner of FB_Bolt)) Equal to True) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to FB_Group
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in FB_Group) Equal to 0
            • Then - Actions
              • Custom script: call DestroyGroup(udg_FB_Group)
            • Else - Actions
              • Countdown Timer - Pause FB_Timer
              • Custom script: set udg_FB_Target = FirstOfGroup(udg_FB_Group)
              • Set FB_Point = (Position of FB_Target)
              • Special Effect - Create a special effect at FB_Point using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
              • Environment - Create a 2.50 second Normal ripple deformation at FB_Point with starting radius 1024.00, ending radius 1024.00, and depth 64.00, using 1.00 second ripples spaced 512.00 apart
              • Unit - Cause FB_Bolt to damage circular area after 0.50 seconds of radius 250.00 at FB_Point, dealing 250.00 damage of attack type Spells and damage type Normal
              • Unit - Remove FB_Bolt from the game
              • Custom script: call RemoveLocation(udg_FB_Point)
              • Custom script: set udg_FB_Bolt = null
              • Custom script: set udg_FB_Target = null
              • Custom script: call DestroyGroup(udg_FB_Group)
              • Custom script: call DestroyTimer(udg_FB_Timer)
              • Custom script: set udg_FB_Group = null
 
Status
Not open for further replies.
Top