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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  5. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  6. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  7. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  8. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  9. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  10. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  11. 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 CLMaxSlashes[1] = 10
    Set CLMaxSlashes[2] = 14
    Set CLMaxSlashes[3] = 18
    -------- Here you can set the speed --------
    Set CLSpeed = 25.00
    -------- Here you can set the Animation --------
    Set CLAnimation = Attack
    -------- Here you can set the Special Effect --------
    Set CLEffect = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
    -------- Here you can set the Attachment of the SFX --------
    Set CLAttachment = weapon
    -------- Here you can set the Damage --------
    Set CLDamage[1] = 50.00
    Set CLDamage[2] = 100.00
    Set CLDamage[3] = 150.00
    -------- Here you can set the animation speed --------
    Set CLAnimationSpeed = 250.00
    -------- Here you can set the transparency of the Illus --------
    Set CLTransparency = 60.00
    -------- Here you can set the duration of the Illusions --------
    Set CLDuration = 0.40
    -------- Here you can set the Minimum distance required to begin attacking --------
    Set CLMinimumDistance = 100.00
    -------- Here you can set the animation index --------
    Set CLAnimationIndex = 6
    -------- Here you can set the slash interval --------
    Set CLSlashInterval = 5
    -------- Here you can set the SFX when the target is slashed. --------
    Set CLSFX = Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
    -------- Here you can change the attachment of that SFX --------
    Set 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 InfiniteSlashesIndex = (InfiniteSlashesIndex + 1)
    Set InfiniteSlashesMui = (InfiniteSlashesMui + 1)
    Set InfiniteSlashesBol1[InfiniteSlashesMui] = True
    Set InfiniteSlashesBol2[InfiniteSlashesMui] = True
    Set InfiniteSlashesCaster[InfiniteSlashesMui] = (Triggering unit)
    Set InfiniteSlashesTarget[InfiniteSlashesMui] = (Target unit of ability being cast)
    Set 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 InfiniteSlashesSFX[InfiniteSlashesMui] = (Last created special effect)
    -------- Setting Number of Slashes --------
    Set 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 InfiniteSlashesTargetLoc = (Position of InfiniteSlashesTarget[InfiniteSlashesLoop])
                Set InfiniteSlashesCasterLoc = (Position of InfiniteSlashesCaster[InfiniteSlashesLoop])
                Set InfiniteSlashesAngle[InfiniteSlashesLoop] = (Angle from InfiniteSlashesCasterLoc to InfiniteSlashesTargetLoc)
                Unit - Make InfiniteSlashesCaster[InfiniteSlashesLoop] face InfiniteSlashesAngle[InfiniteSlashesLoop] over 0.00 seconds
                Set 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 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 InfiniteSlashesBol2[InfiniteSlashesLoop] = False
                    -------- Pausing the Target --------
                    Unit - Pause InfiniteSlashesTarget[InfiniteSlashesLoop]
                  Else - Actions
              Else - Actions
                -------- Counting the time before each strike is executed --------
                Set 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 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 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 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 InfiniteSlashesBol1[InfiniteSlashesLoop] = False
                        Set InfiniteSlashesBol2[InfiniteSlashesLoop] = False
                        Set InfiniteSlashesCaster[InfiniteSlashesLoop] = No unit
                        Set InfiniteSlashesTarget[InfiniteSlashesLoop] = No unit
                        Set InfiniteSlashesDistance[InfiniteSlashesLoop] = 0.00
                        Set InfiniteSlashesCount2[InfiniteSlashesLoop] = 0
                        Set 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 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