• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Spell Help

Status
Not open for further replies.
Level 9
Joined
Dec 26, 2010
Messages
475
hello guys, i need help ^^ i want my spell (Masenko) to damage and explodes when it hits a unit.
+Rep

  • Gohan Masenko
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Masenko
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Masenko_LoopIndex[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Gohan Masenko Loop <gen>
        • Else - Actions
      • Set Masenko_LoopIndex[1] = (Masenko_LoopIndex[1] + 1)
      • Set Masenko_LoopIndex[2] = (Masenko_LoopIndex[2] + 1)
      • -------- ----------------------------------------------------------------------------------------------- --------
      • Set Masenko_Caster[Masenko_LoopIndex[2]] = (Casting unit)
      • Set Masenko_LeakPoint[0] = (Position of Masenko_Caster[Masenko_LoopIndex[2]])
      • Set Masenko_LeakPoint[1] = (Target point of ability being cast)
      • Set Masenko_Angle[Masenko_LoopIndex[2]] = (Angle from Masenko_LeakPoint[0] to Masenko_LeakPoint[1])
      • Set Masenko_LeakPoint[2] = (Masenko_LeakPoint[0] offset by 50.00 towards Masenko_Angle[Masenko_LoopIndex[2]] degrees)
      • Set Masenko_Speed[Masenko_LoopIndex[2]] = 50.00
      • Set Masenko_MaxDistance[Masenko_LoopIndex[2]] = 1500.00
      • Set Masenko_CurDistance[Masenko_LoopIndex[2]] = 0.00
      • Set Masenko_Active[Masenko_LoopIndex[2]] = True
      • Set Masenko_Damage[Masenko_LoopIndex[2]] = (200.00 x (Real((Level of (Ability being cast) for Masenko_Caster[Masenko_LoopIndex[2]]))))
      • Set Masenko_LeakPoint[10] = (Masenko_LeakPoint[0] offset by 50.00 towards (Angle from Masenko_LeakPoint[0] to Masenko_LeakPoint[1]) degrees)
      • Unit - Create 1 Vertical Explosion Orange for (Owner of Masenko_Caster[Masenko_LoopIndex[2]]) at Masenko_LeakPoint[2] facing Masenko_Angle[Masenko_LoopIndex[2]] degrees
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Light Glow Yellow for (Owner of Masenko_Caster[Masenko_LoopIndex[2]]) at Masenko_LeakPoint[2] facing Masenko_LeakPoint[0]
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Masenko Missile Dummy for (Owner of Masenko_Caster[Masenko_LoopIndex[2]]) at Masenko_LeakPoint[0] facing Masenko_Angle[Masenko_LoopIndex[2]] degrees
      • Set Masenko_Dummy[Masenko_LoopIndex[2]] = (Last created unit)
      • Custom script: set udg_Masenko_DamagedUnits[udg_Masenko_LoopIndex[2]] = CreateGroup()
      • Custom script: call RemoveLocation (udg_Masenko_LeakPoint[0])
      • Custom script: call RemoveLocation (udg_Masenko_LeakPoint[1])
      • Custom script: call RemoveLocation (udg_Masenko_LeakPoint[2])
  • Gohan Masenko Loop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • -------- DON'T CHANGE SOMETHING BELOW THIS LINE! --------
      • -------- --------------------------------------------------------------------------------------------------------------------- --------
      • For each (Integer Masenko_LoopIndex[3]) from 1 to Masenko_LoopIndex[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Masenko_Active[Masenko_LoopIndex[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Masenko_CurDistance[Masenko_LoopIndex[3]] Less than Masenko_MaxDistance[Masenko_LoopIndex[3]]
                • Then - Actions
                  • Set Masenko_LeakPoint[0] = (Position of Masenko_Dummy[Masenko_LoopIndex[3]])
                  • Set Masenko_LeakPoint[1] = (Masenko_LeakPoint[0] offset by Masenko_Speed[Masenko_LoopIndex[3]] towards Masenko_Angle[Masenko_LoopIndex[3]] degrees)
                  • Special Effect - Create a special effect at Masenko_LeakPoint[1] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Move Masenko_Dummy[Masenko_LoopIndex[3]] instantly to Masenko_LeakPoint[1], facing Masenko_Angle[Masenko_LoopIndex[3]] degrees
                  • Set Masenko_CurDistance[Masenko_LoopIndex[3]] = (Masenko_CurDistance[Masenko_LoopIndex[3]] + Masenko_Speed[Masenko_LoopIndex[3]])
                  • Set Masenko_TempGroup = (Units within 200.00 of Masenko_LeakPoint[1] matching ((((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of Masenko_Caster[Masenko_LoopIndex[3]])) Equal to False)) and (((Matching unit) is in Masenko_DamagedUnits[
                  • Unit Group - Pick every unit in Masenko_TempGroup and do (Actions)
                    • Loop - Actions
                      • Unit Group - Add (Picked unit) to Masenko_DamagedUnits[Masenko_LoopIndex[3]]
                      • Unit - Cause Masenko_Caster[Masenko_LoopIndex[3]] to damage (Picked unit), dealing Masenko_Damage[Masenko_LoopIndex[3]] damage of attack type Spells and damage type Normal
                  • Custom script: call DestroyGroup (udg_Masenko_TempGroup)
                  • Custom script: call RemoveLocation(udg_Masenko_LeakPoint[0])
                  • Custom script: call RemoveLocation(udg_Masenko_LeakPoint[1])
                • Else - Actions
                  • Unit - Create 1 HellzoneGrenadePiccolo_Explosion for (Owner of Masenko_Caster[Masenko_LoopIndex[2]]) at (Position of Masenko_Dummy[Masenko_LoopIndex[3]]) facing Default building facing degrees
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add a 0.01 second Generic expiration timer to Masenko_Dummy[Masenko_LoopIndex[3]]
                  • Unit - Remove Masenko_Dummy[Masenko_LoopIndex[3]] from the game
                  • Set Masenko_LoopIndex[1] = (Masenko_LoopIndex[1] - 1)
                  • Set Masenko_Active[Masenko_LoopIndex[3]] = False
                  • Custom script: call DestroyGroup (udg_Masenko_DamagedUnits[udg_Masenko_LoopIndex[3]])
                  • Special Effect - Create a special effect at (Position of Masenko_Dummy[Masenko_LoopIndex[3]]) using war3mapImported\Explosion.mdx
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at (Position of Masenko_Dummy[Masenko_LoopIndex[3]]) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Masenko_LoopIndex[1] Equal to 0
        • Then - Actions
          • Set Masenko_LoopIndex[2] = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Status
Not open for further replies.
Top