• 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] MUI problem

Status
Not open for further replies.
Level 5
Joined
Sep 16, 2008
Messages
47
Trigger 1
  • Kamehameha
    • Wydarzenia
    • Warunki
    • Akcje
      • -------- ------------------------------------------------------------ --------
      • -------- Turn On The Loop Trigger --------
      • -------- ------------------------------------------------------------ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • JeĹ›li - Warunki
          • Kamehameha_Index[1] RĂłwna się 0
        • To - Akcje
          • Wyzwalacz - Turn on Kamehameha Loop <gen>
        • Albo - Akcje
      • -------- ------------------------------------------------------------ --------
      • -------- Increase Index Size --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_Index[1] = (Kamehameha_Index[1] + 1)
      • Set Kamehameha_Index[2] = (Kamehameha_Index[2] + 1)
      • -------- ============================================= --------
      • -------- No Changeable Varaiables --------
      • -------- ============================================= --------
      • -------- ------------------------------------------------------------ --------
      • -------- Caster --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_Caster[Kamehameha_Index[2]] = Cannon_Caster
      • Set Kamehameha_Owner[Kamehameha_Index[2]] = (Owner of Kamehameha_Caster[Kamehameha_Index[2]])
      • Set Kamehameha_CasterPosition[Kamehameha_Index[2]] = (Position of Kamehameha_Caster[Kamehameha_Index[2]])
      • -------- ------------------------------------------------------------ --------
      • -------- Ability --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_Ability[Kamehameha_Index[2]] = Cannon_Ability
      • Set Kamehameha_TargetLoc[Kamehameha_Index[2]] = Cannon_TargetPoint
      • Set Kamehameha_AbilityLevel[Kamehameha_Index[2]] = (Level of Kamehameha_Ability[Kamehameha_Index[2]] for Kamehameha_Caster[Kamehameha_Index[2]])
      • -------- ------------------------------------------------------------ --------
      • -------- Reals --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_MoveAngle[Kamehameha_Index[2]] = (Angle from Kamehameha_CasterPosition[Kamehameha_Index[2]] to Kamehameha_TargetLoc[Kamehameha_Index[2]])
      • -------- ============================================= --------
      • -------- SETUP START --------
      • -------- ============================================= --------
      • -------- ------------------------------------------------------------ --------
      • -------- Move --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_MoveSpeed[Kamehameha_Index[2]] = Cannon_Speed
      • Set Kamehameha_MoveDistance[Kamehameha_Index[2]] = Cannon_Distance
      • Set Kamehameha_MoveSpeedIncrease[Kamehameha_Index[2]] = 1.00
      • Set Kamehameha_CollisionRange[Kamehameha_Index[2]] = Cannon_CollisionRange
      • -------- ------------------------------------------------------------ --------
      • -------- Create --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_CreateDistance[Kamehameha_Index[2]] = 50.00
      • Set Kamehameha_CreatePoint[Kamehameha_Index[2]] = (Kamehameha_CasterPosition[Kamehameha_Index[2]] offset by Kamehameha_CreateDistance[Kamehameha_Index[2]] towards Kamehameha_MoveAngle[Kamehameha_Index[2]] degrees)
      • -------- ------------------------------------------------------------ --------
      • -------- Dummy --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_DummyType[Kamehameha_Index[2]] = Kamehameha Dummy [1]
      • -------- ------------------------------------------------------------ --------
      • -------- Fade --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_FadeDummyType[Kamehameha_Index[2]] = Kamehameha Fade Dummy [1]
      • Set Kamehameha_FadeIntervival[Kamehameha_Index[2]] = Cannon_FadeIntervival
      • Set Kamehameha_FadeCurrIntervival[Kamehameha_Index[2]] = 0.00
      • -------- ------------------------------------------------------------ --------
      • -------- Timers --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_ActionTime[Kamehameha_Index[2]] = 0.03
      • -------- ------------------------------------------------------------ --------
      • -------- Explosion --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_ExplosionDummyType1[Kamehameha_Index[2]] = Kamehameha Explosion Dummy [1]
      • Set Kamehameha_ExplosionDummyType2[Kamehameha_Index[2]] = Kamehameha Explosion Dummy [2]
      • Set Kamehameha_ExplosionDummyType3[Kamehameha_Index[2]] = Kamehameha Explosion Dummy [3]
      • Set Kamehameha_ExplosionTime[Kamehameha_Index[2]] = Cannon_ExplosionTime
      • Set Kamehameha_ExplosionCurrInter[Kamehameha_Index[2]] = 0.00
      • Set Kamehameha_ExplosionIntervival[Kamehameha_Index[2]] = Cannon_ExplosionIntervival
      • -------- ------------------------------------------------------------ --------
      • -------- Damage --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_Damage[Kamehameha_Index[2]] = Cannon_Damgae
      • Set Kamehameha_DamageRange[Kamehameha_Index[2]] = Cannon_DamageRnage
      • -------- ------------------------------------------------------------ --------
      • -------- Loop --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_Intervival[Kamehameha_Index[2]] = Cannon_Intervival
      • -------- ------------------------------------------------------------ --------
      • -------- Charge --------
      • -------- ------------------------------------------------------------ --------
      • Set Kamehameha_ChargeAnimation[Kamehameha_Index[2]] = Cannon_ChargeAnimation
      • Set Kamehameha_ChargeTime[Kamehameha_Index[2]] = Cannon_ChargeTime
      • Set Kamehameha_ChargeIntervival[Kamehameha_Index[2]] = Cannon_ChargeIntervival
      • Set Kamehameha_ChargeCurIntervival[Kamehameha_Index[2]] = 0.00
      • Set Kamehameha_ChargeDummyType1[Kamehameha_Index[2]] = Kamehameha Charge Dummy [1]
      • Set Kamehameha_ChargeDummyType2[Kamehameha_Index[2]] = Kamehameha Charge Dummy [2]
      • Set Kamehameha_ChargeDummyType3[Kamehameha_Index[2]] = Kamehameha Charge Dummy [3]
      • -------- ------------------------------------------------------------ --------
      • -------- Actions --------
      • -------- ------------------------------------------------------------ --------
      • Jednostka - Create 1 Kamehameha_DummyType[Kamehameha_Index[2]] for Kamehameha_Owner[Kamehameha_Index[2]] at Kamehameha_CreatePoint[Kamehameha_Index[2]] facing Kamehameha_MoveAngle[Kamehameha_Index[2]] degrees
      • Set Kamehameha_Dummy[Kamehameha_Index[2]] = (Last created unit)
      • Jednostka - Hide Kamehameha_Dummy[Kamehameha_Index[2]]
      • Jednostka - Pauza Kamehameha_Caster[Kamehameha_Index[2]]
      • Animacja - Play Kamehameha_Caster[Kamehameha_Index[2]]'s Kamehameha_ChargeAnimation[Kamehameha_Index[2]] animation
      • Animacja - Change Kamehameha_Caster[Kamehameha_Index[2]]'s animation speed to 1.00% of its original speed
      • Zegar - Start Kamehameha_Timer as a Powtarzalny timer that will expire in Kamehameha_Intervival[Kamehameha_Index[2]] seconds
Trigger 2
  • Kamehameha Loop
    • Wydarzenia
      • Czas - Kamehameha_Timer expires
    • Warunki
    • Akcje
      • For each (Integer Kamehameha_Index[3]) from 1 to Kamehameha_Index[2], do (Actions)
        • Pętla - Akcje
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • JeĹ›li - Warunki
              • Kamehameha_ChargeTime[Kamehameha_Index[3]] Większe niĹĽ 0.00
            • To - Akcje
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • JeĹ›li - Warunki
                  • Kamehameha_ChargeCurIntervival[Kamehameha_Index[3]] Mniejsze Kamehameha_ChargeIntervival[Kamehameha_Index[3]]
                • To - Akcje
                  • Set Kamehameha_ChargeCurIntervival[Kamehameha_Index[3]] = (Kamehameha_ChargeCurIntervival[Kamehameha_Index[3]] + 0.03)
                • Albo - Akcje
                  • Set Kamehameha_CasterPosition[Kamehameha_Index[3]] = (Position of Kamehameha_Caster[Kamehameha_Index[3]])
                  • Set Kamehameha_ChargeCreatePoint[Kamehameha_Index[3]] = (Kamehameha_CasterPosition[Kamehameha_Index[3]] offset by 30.00 towards (Kamehameha_MoveAngle[Kamehameha_Index[3]] - 90.00) degrees)
                  • Jednostka - Create 1 Kamehameha Charge Dummy [1] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_ChargeCreatePoint[Kamehameha_Index[3]] facing Kamehameha_MoveAngle[Kamehameha_Index[3]] degrees
                  • Set Kamehameha_ChargeDummy1[Kamehameha_Index[3]] = (Last created unit)
                  • Set Recycle_Unit = Kamehameha_ChargeDummy1[Kamehameha_Index[3]]
                  • Set Recycle_Expiration = 1.00
                  • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                  • Jednostka - Create 1 Kamehameha Charge Dummy [2] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_ChargeCreatePoint[Kamehameha_Index[3]] facing Kamehameha_MoveAngle[Kamehameha_Index[3]] degrees
                  • Set Kamehameha_ChargeDummy2[Kamehameha_Index[3]] = (Last created unit)
                  • Set Recycle_Unit = Kamehameha_ChargeDummy2[Kamehameha_Index[3]]
                  • Set Recycle_Expiration = 1.00
                  • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                  • Jednostka - Create 1 Kamehameha Charge Dummy [3] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_ChargeCreatePoint[Kamehameha_Index[3]] facing Kamehameha_MoveAngle[Kamehameha_Index[3]] degrees
                  • Set Kamehameha_ChargeDummy3[Kamehameha_Index[3]] = (Last created unit)
                  • Set Recycle_Unit = Kamehameha_ChargeDummy2[Kamehameha_Index[3]]
                  • Set Recycle_Expiration = 1.00
                  • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                  • Custom script: call RemoveLocation (udg_Kamehameha_CasterPosition[udg_Kamehameha_Index[3]])
                  • Custom script: call RemoveLocation (udg_Kamehameha_ChargeCreatePoint[udg_Kamehameha_Index[3]])
                  • Set Kamehameha_ChargeCurIntervival[Kamehameha_Index[3]] = (Kamehameha_ChargeCurIntervival[Kamehameha_Index[3]] - Kamehameha_ChargeIntervival[Kamehameha_Index[3]])
              • Set Kamehameha_ChargeTime[Kamehameha_Index[3]] = (Kamehameha_ChargeTime[Kamehameha_Index[3]] - 0.03)
            • Albo - Akcje
              • Animacja - Change Kamehameha_Caster[Kamehameha_Index[3]]'s animation speed to 50.00% of its original speed
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • JeĹ›li - Warunki
                  • Kamehameha_MoveDistance[Kamehameha_Index[3]] Większe niĹĽ 0.00
                • To - Akcje
                  • Jednostka - Unhide Kamehameha_Dummy[Kamehameha_Index[3]]
                  • Set Kamehameha_DummyPosition[Kamehameha_Index[3]] = (Position of Kamehameha_Dummy[Kamehameha_Index[3]])
                  • Set Kamehameha_MovePoint[Kamehameha_Index[3]] = (Kamehameha_DummyPosition[Kamehameha_Index[3]] offset by Kamehameha_MoveSpeed[Kamehameha_Index[3]] towards Kamehameha_MoveAngle[Kamehameha_Index[3]] degrees)
                  • Jednostka - Move Kamehameha_Dummy[Kamehameha_Index[3]] instantly to Kamehameha_MovePoint[Kamehameha_Index[3]]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • JeĹ›li - Warunki
                      • Kamehameha_FadeCurrIntervival[Kamehameha_Index[3]] Mniejsze Kamehameha_FadeIntervival[Kamehameha_Index[3]]
                    • To - Akcje
                      • Set Kamehameha_FadeCurrIntervival[Kamehameha_Index[3]] = (Kamehameha_FadeCurrIntervival[Kamehameha_Index[3]] + 0.03)
                    • Albo - Akcje
                      • Set Kamehameha_DummyPosition[Kamehameha_Index[3]] = (Position of Kamehameha_Dummy[Kamehameha_Index[3]])
                      • Jednostka - Create 1 Kamehameha_FadeDummyType[Kamehameha_Index[3]] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_DummyPosition[Kamehameha_Index[3]] facing Kamehameha_MoveAngle[Kamehameha_Index[3]] degrees
                      • Set Kamehameha_FadeDummy[Kamehameha_Index[3]] = (Last created unit)
                      • Set Recycle_RemoveEffect = <Pusty ciąg>
                      • Set Recycle_Unit = Kamehameha_FadeDummy[Kamehameha_Index[3]]
                      • Set Recycle_Expiration = ((Kamehameha_MoveDistance[Kamehameha_Index[3]] / Kamehameha_MoveSpeed[Kamehameha_Index[3]]) x 0.03)
                      • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                      • Custom script: call RemoveLocation (udg_Kamehameha_DummyPosition[udg_Kamehameha_Index[3]])
                      • Set Kamehameha_FadeCurrIntervival[Kamehameha_Index[3]] = (Kamehameha_FadeCurrIntervival[Kamehameha_Index[3]] - Kamehameha_FadeIntervival[Kamehameha_Index[3]])
                  • Set Kamehameha_CollisionGroup[Kamehameha_Index[3]] = (Units within Kamehameha_CollisionRange[Kamehameha_Index[3]] of Kamehameha_DummyPosition[Kamehameha_Index[3]] matching ((((Matching unit) is Budynek) RĂłwna się NIE) and ((((Matching unit) is Jednostka latająca) RĂłwna się NIE) and ((((Matching unit) is Od
                  • Grupa jednostek - Pick every unit in Kamehameha_CollisionGroup[Kamehameha_Index[3]] and do (Actions)
                    • Pętla - Akcje
                      • Set Kamehameha_CollisionUnit[Kamehameha_Index[3]] = (Picked unit)
                      • Set Kamehameha_CollisionUnitLoc[Kamehameha_Index[3]] = (Position of Kamehameha_CollisionUnit[Kamehameha_Index[3]])
                      • Set Kamehameha_DummyPosition[Kamehameha_Index[3]] = (Position of Kamehameha_Dummy[Kamehameha_Index[3]])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • JeĹ›li - Warunki
                          • (Distance between Kamehameha_DummyPosition[Kamehameha_Index[3]] and Kamehameha_CollisionUnitLoc[Kamehameha_Index[3]]) Mniejsze lub rĂłwne Kamehameha_CollisionRange[Kamehameha_Index[3]]
                        • To - Akcje
                          • Set Kamehameha_MoveDistance[Kamehameha_Index[3]] = 0.00
                        • Albo - Akcje
                      • Custom script: call RemoveLocation (udg_Kamehameha_DummyPosition[udg_Kamehameha_Index[3]])
                      • Custom script: call RemoveLocation (udg_Kamehameha_CollisionUnitLoc[udg_Kamehameha_Index[3]])
                  • Custom script: call DestroyGroup (udg_Kamehameha_CollisionGroup[udg_Kamehameha_Index[3]])
                  • Custom script: call RemoveLocation (udg_Kamehameha_DummyPosition[udg_Kamehameha_Index[3]])
                  • Custom script: call RemoveLocation (udg_Kamehameha_MovePoint[udg_Kamehameha_Index[3]])
                  • Set Kamehameha_MoveDistance[Kamehameha_Index[3]] = (Kamehameha_MoveDistance[Kamehameha_Index[3]] - Kamehameha_MoveSpeed[Kamehameha_Index[3]])
                • Albo - Akcje
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • JeĹ›li - Warunki
                      • Kamehameha_ActionTime[Kamehameha_Index[3]] Większe niĹĽ 0.00
                    • To - Akcje
                      • Jednostka - Wyłącz pauzÄ™ Kamehameha_Caster[Kamehameha_Index[3]]
                      • Animacja - Change Kamehameha_Caster[Kamehameha_Index[3]]'s animation speed to 100.00% of its original speed
                      • Set Kamehameha_ActionTime[Kamehameha_Index[3]] = (Kamehameha_ActionTime[Kamehameha_Index[3]] - 0.03)
                    • Albo - Akcje
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • JeĹ›li - Warunki
                          • Kamehameha_ExplosionTime[Kamehameha_Index[3]] Większe niĹĽ 0.00
                        • To - Akcje
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • JeĹ›li - Warunki
                              • Kamehameha_ExplosionCurrInter[Kamehameha_Index[3]] Mniejsze Kamehameha_ExplosionIntervival[Kamehameha_Index[3]]
                            • To - Akcje
                              • Set Kamehameha_ExplosionCurrInter[Kamehameha_Index[3]] = (Kamehameha_ExplosionCurrInter[Kamehameha_Index[3]] + 0.03)
                            • Albo - Akcje
                              • Set Kamehameha_DummyPosition[Kamehameha_Index[3]] = (Position of Kamehameha_Dummy[Kamehameha_Index[3]])
                              • Jednostka - Create 1 Kamehameha_ExplosionDummyType1[Kamehameha_Index[3]] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_DummyPosition[Kamehameha_Index[3]] facing DomyĹ›lna orientacja budynku degrees
                              • Set Kamehameha_ExplosionDummy1[Kamehameha_Index[3]] = (Last created unit)
                              • Set Recycle_RemoveEffect = <Pusty ciąg>
                              • Set Recycle_Unit = Kamehameha_ExplosionDummy1[Kamehameha_Index[3]]
                              • Set Recycle_Expiration = 1.00
                              • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                              • Jednostka - Create 1 Kamehameha_ExplosionDummyType2[Kamehameha_Index[3]] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_DummyPosition[Kamehameha_Index[3]] facing DomyĹ›lna orientacja budynku degrees
                              • Set Kamehameha_ExplosionDummy2[Kamehameha_Index[3]] = (Last created unit)
                              • Set Recycle_RemoveEffect = <Pusty ciąg>
                              • Set Recycle_Unit = Kamehameha_ExplosionDummy2[Kamehameha_Index[3]]
                              • Set Recycle_Expiration = 1.00
                              • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                              • Jednostka - Create 1 Kamehameha_ExplosionDummyType3[Kamehameha_Index[3]] for Kamehameha_Owner[Kamehameha_Index[3]] at Kamehameha_DummyPosition[Kamehameha_Index[3]] facing DomyĹ›lna orientacja budynku degrees
                              • Set Kamehameha_ExplosionDummy3[Kamehameha_Index[3]] = (Last created unit)
                              • Set Recycle_RemoveEffect = <Pusty ciąg>
                              • Set Recycle_Unit = Kamehameha_ExplosionDummy3[Kamehameha_Index[3]]
                              • Set Recycle_Expiration = 1.00
                              • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                              • Set Kamehameha_DamageGroup[Kamehameha_Index[3]] = (Units within Kamehameha_DamageRange[Kamehameha_Index[3]] of Kamehameha_DummyPosition[Kamehameha_Index[3]] matching ((((Matching unit) is Budynek) RĂłwna się NIE) and ((((Matching unit) is Jednostka latająca) RĂłwna się NIE) and ((((Matching unit) is Odpor
                              • Grupa jednostek - Pick every unit in Kamehameha_DamageGroup[Kamehameha_Index[3]] and do (Actions)
                                • Pętla - Akcje
                                  • Set Kamehameha_Damaged[Kamehameha_Index[3]] = (Picked unit)
                                  • Jednostka - Cause Kamehameha_Caster[Kamehameha_Index[3]] to damage Kamehameha_Damaged[Kamehameha_Index[3]], dealing Kamehameha_Damage[Kamehameha_Index[3]] damage of attack type Zaklęcia and damage type Normalny
                              • Custom script: call DestroyGroup (udg_Kamehameha_DamageGroup[udg_Kamehameha_Index[3]])
                              • Custom script: call RemoveLocation (udg_Kamehameha_DummyPosition[udg_Kamehameha_Index[3]])
                              • Set Kamehameha_ExplosionCurrInter[Kamehameha_Index[3]] = (Kamehameha_ExplosionCurrInter[Kamehameha_Index[3]] - Kamehameha_ExplosionIntervival[Kamehameha_Index[3]])
                          • Set Kamehameha_ExplosionTime[Kamehameha_Index[3]] = (Kamehameha_ExplosionTime[Kamehameha_Index[3]] - 0.03)
                        • Albo - Akcje
                          • Set Recycle_RemoveEffect = <Pusty ciąg>
                          • Set Recycle_Unit = Kamehameha_Dummy[Kamehameha_Index[3]]
                          • Set Recycle_Expiration = 0.01
                          • Wyzwalacz - Run Recycler Run <gen> (checking conditions)
                          • Set Kamehameha_Index[1] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • JeĹ›li - Warunki
          • Kamehameha_Index[1] RĂłwna się 0
        • To - Akcje
          • Set Kamehameha_Index[2] = 0
          • Zegar - Pauza Kamehameha_Timer
          • Wyzwalacz - Turn off (This trigger)
        • Albo - Akcje
Example
  • Example
    • Wydarzenia
      • Jednostka - A unit Rozpoczyna dziaĹ‚anie zdolnoĹ›ci
    • Warunki
      • (Ability being cast) RĂłwna się Kamehameha
    • Akcje
      • Set Cannon_Caster = (Triggering unit)
      • Set Cannon_Ability = (Ability being cast)
      • Set Cannon_ChargeAnimation = Spell Throw
      • Set Cannon_ChargeIntervival = 0.12
      • Set Cannon_ChargeTime = 1.50
      • Set Cannon_CollisionRange = 50.00
      • Set Cannon_DamageRnage = 300.00
      • Set Cannon_Damgae = 13.33
      • Set Cannon_Distance = 1500.00
      • Set Cannon_ExplosionIntervival = 0.10
      • Set Cannon_ExplosionTime = 1.50
      • Set Cannon_FadeIntervival = 0.03
      • Set Cannon_Intervival = 0.03
      • Set Cannon_Speed = 20.00
      • Set Cannon_TargetPoint = (Target point of ability being cast)
      • Wyzwalacz - Run Kamehameha <gen> (checking conditions)
I can't cast this spell more than 1 time. If i cast it with second hero he is paused and spell stop when first spell end.
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
well you should translate the full trigger ~.~
anyway, here you are a good indexing system i use:
first set the maximum array value, try to set it to a proper value around 4-5.
  • Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ability
    • Actions
      • Set Get = False
      • For each (Integer A) from 1 to Max, do (Actions) [loop till the maximum size given in an init trigger]
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Get Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Recycle[(Integer A)] Equal to True [checks if the integer A slot is free]
                • Then - Actions
                  • Set Index = (Integer A)
                  • Set Get= True [with this the trigger only choose the first free slot]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Integer A) Equal to Max
                    • Then - Actions
                      • Set Max = (Max + 1) [if the current size is not enought it increases it]
                      • Set Recycle[Max] = True
                    • Else - Actions
            • Else - Actions
      • Set Caster[Index] = (Triggering unit)
      • Set Timer[Index] = (2.00 + (Real((Level of Ability for Caster[Index]))))
      • Set Etc.... [other things you want to store example locations or damage]
      • Set Has[Index] = True [this will check if the trigger still have to run for that unit]
      • Set Count = (Count + 1) [counts the number of units casted the spell]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Loop <gen>
        • Else - Actions
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Integer) from 1 to Max, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Has[Integer] Equal to True
            • Then - Actions
              • [Things you want to do]
            • Else - Actions
              • Set Has[Index] = False
              • Set Count = (Count - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Count Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
also if you have long triggers, put them into hidden tags
 
Status
Not open for further replies.
Top