• 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] Is this ready yet?

Status
Not open for further replies.
Level 3
Joined
Sep 6, 2014
Messages
13
I have a new spell going to be uploaded, but I need some review before it. Since this is my first spell I'm going to upload, I want it just as neat as possible. :grin:

So, here's the triggers:
  • Rushing Slash Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- =========================================================================== --------
      • -------- -------- Configuration -------- --------
      • -------- =========================================================================== --------
      • -------- Sets the ability object --------
      • Set Rsla_Ability = Rushing Slash
      • -------- --------------------------- --------
      • -------- Sets the caster move speed --------
      • Set Rsla_MoveSpeed[1] = 25.00
      • Set Rsla_MoveSpeed[2] = 25.00
      • Set Rsla_MoveSpeed[3] = 25.00
      • Set Rsla_MoveSpeed[4] = 25.00
      • -------- --------------------------- --------
      • -------- Sets how many times should the caster slash the target --------
      • Set Rsla_SlashTimes[1] = 25
      • Set Rsla_SlashTimes[2] = 30
      • Set Rsla_SlashTimes[3] = 35
      • Set Rsla_SlashTimes[4] = 40
      • -------- --------------------------- --------
      • -------- Sets the damage of each slashes --------
      • Set Rsla_SlashDamage[1] = 10.00
      • Set Rsla_SlashDamage[2] = 12.00
      • Set Rsla_SlashDamage[3] = 14.00
      • Set Rsla_SlashDamage[4] = 16.00
      • -------- --------------------------- --------
      • -------- Sets the caster slash hit effect --------
      • Set Rsla_SlashEffect = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
      • -------- --------------------------- --------
      • -------- Sets the caster slash animation --------
      • Set Rsla_SlashAnimation = attack
      • -------- --------------------------- --------
      • -------- Sets the caster slash animation speed --------
      • Set Rsla_SlashAnimSpeed = 400.00
      • -------- --------------------------- --------
      • -------- Sets the attack-type --------
      • Set Rsla_AttackType = Normal
      • -------- --------------------------- --------
      • -------- Sets the damage-type --------
      • Set Rsla_DamageType = Normal
      • -------- --------------------------- --------
      • -------- =========================================================================== --------
      • -------- -------- End of Configuration -------- --------
      • -------- =========================================================================== --------
  • Rushing Slash Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rsla_Ability
    • Actions
      • -------- Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rsla_MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn on Rushing Slash Loop <gen>
        • Else - Actions
      • Set Rsla_MaxIndex = (Rsla_MaxIndex + 1)
      • -------- --------------------------- --------
      • -------- Setting variables --------
      • Set Rsla_Caster[Rsla_MaxIndex] = (Triggering unit)
      • Set Rsla_Target[Rsla_MaxIndex] = (Target unit of ability being cast)
      • Set Rsla_Level[Rsla_MaxIndex] = (Level of Rsla_Ability for Rsla_Caster[Rsla_MaxIndex])
      • Set Rsla_TempLoc = (Position of Rsla_Caster[Rsla_MaxIndex])
      • Set Rsla_TempLoc2 = (Position of Rsla_Target[Rsla_MaxIndex])
      • Set Rsla_Angle[Rsla_MaxIndex] = (Angle from Rsla_TempLoc to Rsla_TempLoc2)
      • Set Rsla_Distance[Rsla_MaxIndex] = (Distance between Rsla_TempLoc and Rsla_TempLoc2)
      • Set Rsla_Counter[Rsla_MaxIndex] = 0
      • -------- --------------------------- --------
      • Unit - Turn collision for Rsla_Caster[Rsla_MaxIndex] Off
      • Animation - Change Rsla_Caster[Rsla_MaxIndex]'s animation speed to Rsla_SlashAnimSpeed% of its original speed
      • -------- Remove locations --------
      • Custom script: call RemoveLocation(udg_Rsla_TempLoc)
      • Custom script: call RemoveLocation(udg_Rsla_TempLoc2)
      • -------- --------------------------- --------
  • Rushing Slash Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Rsla_Index) from 1 to Rsla_MaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Rsla_Caster[Rsla_Index] is dead) Equal to False
                  • (Rsla_Target[Rsla_Index] is dead) Equal to False
                  • Rsla_Counter[Rsla_Index] Less than Rsla_SlashTimes[Rsla_Level[Rsla_Index]]
            • Then - Actions
              • -------- Stores some points used to move to --------
              • Set Rsla_TempLoc = (Position of Rsla_Target[Rsla_Index])
              • Set Rsla_TempLoc2 = (Rsla_TempLoc offset by Rsla_MoveSpeed[Rsla_Level[Rsla_Index]] towards Rsla_Angle[Rsla_Index] degrees)
              • Set Rsla_TempLoc3 = (Rsla_TempLoc2 offset by Rsla_Distance[Rsla_Index] towards (Rsla_Angle[Rsla_Index] + 180.00) degrees)
              • -------- --------------------------- --------
              • Unit - Move Rsla_Target[Rsla_Index] instantly to Rsla_TempLoc2
              • Unit - Move Rsla_Caster[Rsla_Index] instantly to Rsla_TempLoc3
              • Animation - Play Rsla_Caster[Rsla_Index]'s Rsla_SlashAnimation animation
              • Unit - Cause Rsla_Caster[Rsla_Index] to damage Rsla_Target[Rsla_Index], dealing Rsla_SlashDamage[Rsla_Level[Rsla_Index]] damage of attack type Rsla_AttackType and damage type Rsla_DamageType
              • Special Effect - Create a special effect at Rsla_TempLoc using Rsla_SlashEffect
              • Special Effect - Destroy (Last created special effect)
              • -------- Increases slash counter --------
              • Set Rsla_Counter[Rsla_Index] = (Rsla_Counter[Rsla_Index] + 1)
              • -------- --------------------------- --------
              • -------- Remove locations --------
              • Custom script: call RemoveLocation(udg_Rsla_TempLoc)
              • Custom script: call RemoveLocation(udg_Rsla_TempLoc2)
              • Custom script: call RemoveLocation(udg_Rsla_TempLoc3)
              • -------- --------------------------- --------
            • Else - Actions
              • -------- Backup to normal --------
              • Animation - Change Rsla_Caster[Rsla_Index]'s animation speed to 100.00% of its original speed
              • Unit - Turn collision for Rsla_Caster[Rsla_Index] On
              • -------- --------------------------- --------
              • -------- Recycling --------
              • Set Rsla_Angle[Rsla_Index] = Rsla_Angle[Rsla_MaxIndex]
              • Set Rsla_Caster[Rsla_Index] = Rsla_Caster[Rsla_MaxIndex]
              • Set Rsla_Counter[Rsla_Index] = Rsla_Counter[Rsla_MaxIndex]
              • Set Rsla_Level[Rsla_Index] = Rsla_Level[Rsla_MaxIndex]
              • Set Rsla_Target[Rsla_Index] = Rsla_Target[Rsla_MaxIndex]
              • Set Rsla_MaxIndex = (Rsla_MaxIndex - 1)
              • Set Rsla_Index = (Rsla_Index - 1)
              • -------- --------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Rsla_MaxIndex Equal to 0
                • Then - Actions
                  • -------- Turn off trigger when there's no more instance left --------
                  • Trigger - Turn off (This trigger)
                  • -------- --------------------------- --------
                • Else - Actions
At the moment, I don't really need any suggestion, just some fixes that MUST be done. :goblin_boom:
 
Status
Not open for further replies.
Top