1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Join the 6th Melee Mapping Contest for a chance to have your map featured in this year's Hive Cup!
    Dismiss Notice
  5. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  6. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  7. Let your favorite entries duke it out in the 15th Techtree Contest Poll.
    Dismiss Notice
  8. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Infinite Slashes v1.05.w3x
Variables
Infinite Slashes
Configuration Trigger
Infinite Slashes Cast
Infinite Slashes Loop
Infintie Slashes Dummy
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
CLAnimation string No
CLAnimationIndex integer No
CLAnimationSpeed real No
CLAttach string No
CLAttachment string No
CLDamage real Yes
CLDuration real No
CLEffect string No
CLMaxSlashes integer Yes
CLMinimumDistance real No
CLSFX string No
CLSlashInterval integer No
CLSpeed real No
CLSpellLevel integer Yes
CLTransparency real No
InfiniteSlashesAngle real Yes
InfiniteSlashesBol1 boolean Yes
InfiniteSlashesBol2 boolean Yes
InfiniteSlashesCaster unit Yes
InfiniteSlashesCasterLoc location No
InfiniteSlashesCasterLoc2 location No
InfiniteSlashesCount1 integer Yes
InfiniteSlashesCount2 integer Yes
InfiniteSlashesDamage real Yes
InfiniteSlashesDistance real Yes
InfiniteSlashesIndex integer No
InfiniteSlashesLoop integer No
InfiniteSlashesMui integer No
InfiniteSlashesPERCENT real Yes
InfiniteSlashesSFX effect Yes
InfiniteSlashesTarget unit Yes
InfiniteSlashesTargetLoc location No
Configuration Trigger
  Events
    Map initialization
  Conditions
  Actions
    -------- Here you can set the Number of Attacks --------
    Set VariableSet CLMaxSlashes[1] = 10
    Set VariableSet CLMaxSlashes[2] = 14
    Set VariableSet CLMaxSlashes[3] = 18
    -------- Here you can set the speed --------
    Set VariableSet CLSpeed = 25.00
    -------- Here you can set the Animation --------
    Set VariableSet CLAnimation = Attack
    -------- Here you can set the Special Effect --------
    Set VariableSet CLEffect = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
    -------- Here you can set the Attachment of the SFX --------
    Set VariableSet CLAttachment = weapon
    -------- Here you can set the Damage --------
    Set VariableSet CLDamage[1] = 50.00
    Set VariableSet CLDamage[2] = 100.00
    Set VariableSet CLDamage[3] = 150.00
    -------- Here you can set the animation speed --------
    Set VariableSet CLAnimationSpeed = 250.00
    -------- Here you can set the transparency of the Illus --------
    Set VariableSet CLTransparency = 60.00
    -------- Here you can set the duration of the Illusions --------
    Set VariableSet CLDuration = 0.40
    -------- Here you can set the Minimum distance required to begin attacking --------
    Set VariableSet CLMinimumDistance = 100.00
    -------- Here you can set the animation index --------
    Set VariableSet CLAnimationIndex = 6
    -------- Here you can set the slash interval --------
    Set VariableSet CLSlashInterval = 5
    -------- Here you can set the SFX when the target is slashed. --------
    Set VariableSet CLSFX = Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
    -------- Here you can change the attachment of that SFX --------
    Set VariableSet CLAttach = chest
Infinite Slashes Cast
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Infinite Slashes
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        InfiniteSlashesIndex Equal to 0
      Then - Actions
        Trigger - Turn on Infinite_Slashes_Loop <gen>
      Else - Actions
    -------- Do not touch this --------
    Set VariableSet InfiniteSlashesIndex = (InfiniteSlashesIndex + 1)
    Set VariableSet InfiniteSlashesMui = (InfiniteSlashesMui + 1)
    Set VariableSet InfiniteSlashesBol1[InfiniteSlashesMui] = True
    Set VariableSet InfiniteSlashesBol2[InfiniteSlashesMui] = True
    Set VariableSet InfiniteSlashesCaster[InfiniteSlashesMui] = (Triggering unit)
    Set VariableSet InfiniteSlashesTarget[InfiniteSlashesMui] = (Target unit of ability being cast)
    Set VariableSet CLSpellLevel[InfiniteSlashesMui] = (Level of Infinite Slashes for InfiniteSlashesCaster[InfiniteSlashesMui])
    -------- Do not touch this --------
    Animation - Change InfiniteSlashesCaster[InfiniteSlashesMui]'s animation speed to CLAnimationSpeed% of its original speed
    -------- Special Effect --------
    Special Effect - Create a special effect attached to the CLAttachment of InfiniteSlashesCaster[InfiniteSlashesMui] using CLEffect
    Set VariableSet InfiniteSlashesSFX[InfiniteSlashesMui] = (Last created special effect)
    -------- Setting Number of Slashes --------
    Set VariableSet InfiniteSlashesCount2[InfiniteSlashesMui] = CLMaxSlashes[CLSpellLevel[InfiniteSlashesMui]]
    -------- Pausing the Caster --------
    Unit - Pause InfiniteSlashesCaster[InfiniteSlashesMui]
Infinite Slashes Loop
  Events
    Time - Every 0.04 seconds of game time
  Conditions
  Actions
    For each (Integer InfiniteSlashesLoop) from 1 to InfiniteSlashesMui, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            InfiniteSlashesBol1[InfiniteSlashesLoop] Equal to True
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                InfiniteSlashesBol2[InfiniteSlashesLoop] Equal to True
              Then - Actions
                -------- Moving the Caster --------
                Set VariableSet InfiniteSlashesTargetLoc = (Position of InfiniteSlashesTarget[InfiniteSlashesLoop])
                Set VariableSet InfiniteSlashesCasterLoc = (Position of InfiniteSlashesCaster[InfiniteSlashesLoop])
                Set VariableSet InfiniteSlashesAngle[InfiniteSlashesLoop] = (Angle from InfiniteSlashesCasterLoc to InfiniteSlashesTargetLoc)
                Unit - Make InfiniteSlashesCaster[InfiniteSlashesLoop] face InfiniteSlashesAngle[InfiniteSlashesLoop] over 0.00 seconds
                Set VariableSet InfiniteSlashesCasterLoc2 = (InfiniteSlashesCasterLoc offset by CLSpeed towards InfiniteSlashesAngle[InfiniteSlashesLoop] degrees.)
                Custom script: call RemoveLocation(udg_InfiniteSlashesCasterLoc)
                Custom script: call SetUnitX(udg_InfiniteSlashesCaster[udg_InfiniteSlashesLoop],GetUnitX(udg_InfiniteSlashesCaster[udg_InfiniteSlashesLoop]) + udg_CLSpeed * Cos(udg_InfiniteSlashesAngle[udg_InfiniteSlashesLoop] * bj_DEGTORAD))
                Custom script: call SetUnitY(udg_InfiniteSlashesCaster[udg_InfiniteSlashesLoop],GetUnitY(udg_InfiniteSlashesCaster[udg_InfiniteSlashesLoop]) + udg_CLSpeed * Sin(udg_InfiniteSlashesAngle[udg_InfiniteSlashesLoop] * bj_DEGTORAD))
                Set VariableSet InfiniteSlashesDistance[InfiniteSlashesLoop] = (Distance between InfiniteSlashesCasterLoc2 and InfiniteSlashesTargetLoc)
                Custom script: call SetUnitAnimationByIndex( udg_InfiniteSlashesCaster[udg_InfiniteSlashesLoop], udg_CLAnimationIndex)
                Unit - Create 1.Infinite Slashes Dummy for (Owner of InfiniteSlashesCaster[InfiniteSlashesLoop]) at InfiniteSlashesCasterLoc2 facing InfiniteSlashesAngle[InfiniteSlashesLoop] degrees
                Animation - Change (Last created unit)'s vertex coloring to (100%, 100%, 100%) with CLTransparency% transparency
                Unit - Add a CLDuration second Generic expiration timer to (Last created unit)
                Custom script: call SetUnitAnimationByIndex(GetLastCreatedUnit(), udg_CLAnimationIndex)
                Custom script: call RemoveLocation(udg_InfiniteSlashesCasterLoc2)
                Custom script: call RemoveLocation(udg_InfiniteSlashesTargetLoc)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    InfiniteSlashesDistance[InfiniteSlashesLoop] Less than or equal to CLMinimumDistance
                  Then - Actions
                    -------- Setting the Loop to attack instead of move --------
                    Set VariableSet InfiniteSlashesBol2[InfiniteSlashesLoop] = False
                    -------- Pausing the Target --------
                    Unit - Pause InfiniteSlashesTarget[InfiniteSlashesLoop]
                  Else - Actions
              Else - Actions
                -------- Counting the time before each strike is executed --------
                Set VariableSet InfiniteSlashesCount1[InfiniteSlashesLoop] = (InfiniteSlashesCount1[InfiniteSlashesLoop] + 1)
                -------- Here its every .2 seconds as the slash starts when the int is 5 --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    InfiniteSlashesCount1[InfiniteSlashesLoop] Equal to CLSlashInterval
                  Then - Actions
                    -------- Stopping previous sounds --------
                    Sound - Stop MetalHeavySliceStone2 <gen> Immediately
                    -------- Reseting the count --------
                    Set VariableSet InfiniteSlashesCount1[InfiniteSlashesLoop] = 0
                    Animation - Play InfiniteSlashesCaster[InfiniteSlashesLoop]'s CLAnimation animation
                    -------- Dealing Damage --------
                    Unit - Cause InfiniteSlashesCaster[InfiniteSlashesLoop] to damage InfiniteSlashesTarget[InfiniteSlashesLoop], dealing CLDamage[CLSpellLevel[InfiniteSlashesLoop]] damage of attack type Normal and damage type Normal
                    Special Effect - Create a special effect attached to the CLAttach of InfiniteSlashesTarget[InfiniteSlashesLoop] using CLSFX
                    Special Effect - Destroy (Last created special effect)
                    -------- Creating Sound --------
                    Sound - Play MetalHeavySliceStone2 <gen> at 100% volume, attached to InfiniteSlashesTarget[InfiniteSlashesLoop]
                    -------- Decreasing the remaining attacks --------
                    Set VariableSet InfiniteSlashesCount2[InfiniteSlashesLoop] = (InfiniteSlashesCount2[InfiniteSlashesLoop] - 1)
                    -------- Do not touch this --------
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (InfiniteSlashesTarget[InfiniteSlashesLoop] is paused) Not equal to True
                      Then - Actions
                        Unit - Pause InfiniteSlashesTarget[InfiniteSlashesLoop]
                      Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        Or - Any (Conditions) are true
                          Conditions
                            (InfiniteSlashesCaster[InfiniteSlashesLoop] is alive) Not equal to True
                            (InfiniteSlashesTarget[InfiniteSlashesLoop] is alive) Not equal to True
                            InfiniteSlashesCount2[InfiniteSlashesLoop] Equal to 0
                      Then - Actions
                        -------- Do not touch this --------
                        Unit - Order InfiniteSlashesCaster[InfiniteSlashesLoop] to Stop.
                        Set VariableSet InfiniteSlashesBol1[InfiniteSlashesLoop] = False
                        Special Effect - Destroy InfiniteSlashesSFX[InfiniteSlashesLoop]
                        Unit - Unpause InfiniteSlashesTarget[InfiniteSlashesLoop]
                        Unit - Unpause InfiniteSlashesCaster[InfiniteSlashesLoop]
                        Animation - Change InfiniteSlashesCaster[InfiniteSlashesLoop]'s animation speed to 100% of its original speed
                        Set VariableSet InfiniteSlashesBol1[InfiniteSlashesLoop] = False
                        Set VariableSet InfiniteSlashesBol2[InfiniteSlashesLoop] = False
                        Set VariableSet InfiniteSlashesCaster[InfiniteSlashesLoop] = No unit
                        Set VariableSet InfiniteSlashesTarget[InfiniteSlashesLoop] = No unit
                        Set VariableSet InfiniteSlashesDistance[InfiniteSlashesLoop] = 0.00
                        Set VariableSet InfiniteSlashesCount2[InfiniteSlashesLoop] = 0
                        Set VariableSet InfiniteSlashesIndex = (InfiniteSlashesIndex - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            InfiniteSlashesIndex Equal to 0
                          Then - Actions
                            Set VariableSet InfiniteSlashesMui = 0
                            Trigger - Turn off (This trigger)
                          Else - Actions
                        -------- Do not touch this --------
                      Else - Actions
                  Else - Actions
          Else - Actions
this trigger is for the dummy
Infintie Slashes Dummy
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Triggering unit)) Equal to Infinite Slashes Dummy
  Actions
    Unit - Remove (Triggering unit) from the game