• 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] Can anyone tell why this doesnt work?

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2010
Messages
63
Hello guys, I made a spell on a map and want to import it to my main map, but when I do it, the spell fails, it start but it doesnt finish, can anyone here tell me why? Thanks , heres the code? ( when I use it on the other map, it works fine, I just cant understand why when I import it, it doesnt work, never happened to me )

  • Flame Circle Settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set FC_Ability = Meteoro
      • Set FC_Speed = 20.00
      • Set FC_AoE2 = 80.00
      • Set FC_Number = 4
      • Set FC_Check = True
  • Flame Circle Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inferno
    • Actions
      • -------- Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FC_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on Flame Circle Loop <gen>
        • Else - Actions
      • Set FC_Index1 = (FC_Index1 + 1)
      • Set FC_Index2 = (FC_Index2 + 1)
      • -------- Caster --------
      • Set FC_Caster[FC_Index2] = (Triggering unit)
      • Set FC_Level = (Level of (Ability being cast) for FC_Caster[FC_Index2])
      • -------- Damage near the circle --------
      • Set FC_Damage1[FC_Index2] = ((Real((Intelligence of FC_Caster[FC_Index2] (Include bonuses)))) x 5.00)
      • -------- Duration of the spell --------
      • Set FC_Duration[FC_Index2] = ((Real((Level of FC_Ability for FC_Caster[FC_Index2]))) x 1.90)
  • Flame Circle Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FC_Index3) from 1 to FC_Index2, do (Actions)
        • Loop - Actions
          • Custom script: set udg_FC_Duration[udg_FC_Index3] = ( udg_FC_Duration[udg_FC_Index3] - 0.10 ) //HERE!!!
          • Set FC_Real[FC_Index3] = (FC_Real[FC_Index3] + FC_Speed)
          • Set FC_Point1 = (Position of FC_Caster[FC_Index3])
          • If (FC_AoE1[FC_Index3] Greater than or equal to 259.00) then do (Set FC_AoE1[FC_Index3] = 0.00) else do (Do nothing)
          • For each (Integer A) from 1 to FC_Number, do (Actions)
            • Loop - Actions
              • Set FC_AoE1[FC_Index3] = (FC_AoE1[FC_Index3] + 80.00)
              • Set FC_Point2 = (FC_Point1 offset by FC_AoE1[FC_Index3] towards FC_Real[FC_Index3] degrees)
              • Special Effect - Create a special effect at FC_Point2 using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within FC_AoE2 of FC_Point2 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of FC_Caster[FC_Index3])) Equal to True)))) and do (Actions)
                • Loop - Actions
                  • Unit - Cause FC_Caster[FC_Index3] to damage (Picked unit), dealing FC_Damage1[FC_Index3] damage of attack type Spells and damage type Normal
              • Custom script: call RemoveLocation(udg_FC_Point2)
          • -------- Turning trigger off, if duration expired --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FC_Duration[FC_Index3] Less than or equal to 0.00
            • Then - Actions
              • Set FC_Index1 = (FC_Index1 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FC_Index1 Equal to 0
                • Then - Actions
                  • -------- -------------------------------------------------- --------
                  • -------- Removing Leaks --------
                  • -------- -------------------------------------------------- --------
                  • Lightning - Destroy FC_Lightning[FC_Index3]
                  • Custom script: call RemoveLocation(udg_FC_Point1)
                  • Custom script: call RemoveLocation(udg_FC_Point2)
                  • Set FC_Index2 = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • -------- -------------------------------------------------- --------
          • -------- Removing Leaks --------
          • -------- -------------------------------------------------- --------
          • Custom script: call RemoveLocation(udg_FC_Point1)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Perhaps some variables doesn't gets used in the trigger folders you were copying.
That variables are not included in the "importing of triggers to another map", this is one of the reasons it would not work.

Indexing like CurrentIndex loops from another trigger always don't gets to be used (set) in the trigger, therefore CurrentIndex variable does not gets imported to another map because you just create it and use it, you never set it.

When you copy the triggers, it doesn't register any setting of that variable, therefore no variable of that type is imported.

Hmmm, hard to understand it, but can you give us the map (original map) ?
I can try import it to another map and see the problem.
 
Level 4
Joined
Jul 22, 2010
Messages
63
Sure thing, here it is.

Also, it is not working properly when I cast it simultanious with other unit, the spell is "cut", try it and see, help me please!
 

Attachments

  • Flame Circle.w3x
    63.3 KB · Views: 40
Status
Not open for further replies.
Top