• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Toss

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
I have it in my map, but it might not be exactly like in Dota 2, as I adjust the spells generally to my liking.

1) Download this Jump System from Paladon Jump System [Paladon]

2) And then re-create this trigger:

  • Toss Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Toss
    • Actions
      • Set VariableSet Toss_Caster[0] = (Triggering unit)
      • Set VariableSet Toss_Point[1] = (Position of Toss_Caster[0])
      • Set VariableSet Toss_Distance[1] = 275.00
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 275.00 of Toss_Point[1].) and do (Actions)
        • Loop - Actions
          • Set VariableSet Toss_UnitTemp = (Picked unit)
          • Set VariableSet Toss_Point[2] = (Position of Toss_UnitTemp)
          • Set VariableSet Toss_Distance[2] = (Distance between Toss_Point[1] and Toss_Point[2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Toss_UnitTemp is alive) Equal to True
              • (Toss_UnitTemp is An Ancient) Equal to False
              • (Toss_UnitTemp is A structure) Equal to False
              • (Toss_UnitTemp is visible to (Owner of Toss_Caster[0]).) Equal to True
              • Toss_UnitTemp Not equal to Toss_Caster[0]
              • Toss_Distance[2] Less than or equal to Toss_Distance[1]
              • (Toss_UnitTemp is in JD_Group.) Equal to False
            • Then - Actions
              • Set VariableSet Toss_Distance[1] = Toss_Distance[2]
              • Set VariableSet Toss_Unit = Toss_UnitTemp
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Toss_Point[2])
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Toss_Unit Not equal to No unit
        • Then - Actions
          • Set VariableSet JDA_TargetPoint = (Position of (Target unit of ability being cast))
          • Set VariableSet JDA_Unit = Toss_Unit
          • Set VariableSet Toss_Point[2] = (Position of Toss_Unit)
          • Set VariableSet JDA_Speed = ((Distance between Toss_Point[2] and JDA_TargetPoint) x 0.03)
          • Set VariableSet JDA_SpecialEffect = war3mapImported\Sliding EffectsDustAndRocks.mdx
          • Set VariableSet Toss_Unit = No unit
          • Trigger - Run Toss Jump <gen> (checking conditions)
          • Custom script: call RemoveLocation(udg_Toss_Point[2])
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Toss_Point[1])
  • Toss Jump
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JD_Integers[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Toss Jump Loop <gen>
        • Else - Actions
      • Set VariableSet JD_Integers[1] = (JD_Integers[1] + 1)
      • Set VariableSet JD_Integers[2] = (JD_Integers[2] + 1)
      • Set VariableSet JD_TempPoint[1] = (Position of JDA_Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between JD_TempPoint[1] and JDA_TargetPoint) Less than or equal to 50.00
        • Then - Actions
          • Set VariableSet JD_Distances[JD_Integers[2]] = 800.00
          • Set VariableSet JD_SpeedUnits[JD_Integers[2]] = 24.00
          • Set VariableSet Toss_Boolean[JD_Integers[2]] = True
        • Else - Actions
          • Set VariableSet JD_Distances[JD_Integers[2]] = (Distance between JD_TempPoint[1] and JDA_TargetPoint)
          • Set VariableSet JD_SpeedUnits[JD_Integers[2]] = JDA_Speed
          • Set VariableSet Toss_Boolean[JD_Integers[2]] = False
      • Set VariableSet JD_ReachedDistance[JD_Integers[2]] = 0.00
      • Set VariableSet JD_Unit[JD_Integers[2]] = JDA_Unit
      • Set VariableSet JD_Angle[JD_Integers[2]] = (Angle from JD_TempPoint[1] to JDA_TargetPoint)
      • Set VariableSet JD_HighSettings[JD_Integers[2]] = 800.00
      • Unit Group - Add JDA_Unit to JD_Group
      • Unit - Add Storm Crow Form to JDA_Unit
      • Unit - Remove Storm Crow Form from JDA_Unit
      • Unit - Turn collision for JDA_Unit Off.
      • Special Effect - Create a special effect attached to the origin of JDA_Unit using war3mapImported\Sliding EffectsDustAndRocks.mdx
      • Set VariableSet Toss_SFX[JD_Integers[2]] = (Last created special effect)
      • Set VariableSet Toss_Caster[JD_Integers[2]] = Toss_Caster[0]
      • Set VariableSet Toss_Damage[JD_Integers[2]] = (20.00 + (70.00 x (Real((Level of Toss for Toss_Caster[JD_Integers[2]])))))
      • Custom script: call RemoveLocation (udg_JD_TempPoint[1])
      • Custom script: call RemoveLocation (udg_JDA_TargetPoint)
  • Toss Jump Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer JD_Integers[3]) from 1 to JD_Integers[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (JD_Unit[JD_Integers[3]] is in JD_Group.) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • JD_ReachedDistance[JD_Integers[3]] Less than JD_Distances[JD_Integers[3]]
                • Then - Actions
                  • Set VariableSet JD_TempPoint[1] = (Position of JD_Unit[JD_Integers[3]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Toss_Boolean[JD_Integers[3]] Equal to False
                    • Then - Actions
                      • Set VariableSet JD_TempPoint[2] = (JD_TempPoint[1] offset by JD_SpeedUnits[JD_Integers[3]] towards JD_Angle[JD_Integers[3]] degrees.)
                      • Unit - Move JD_Unit[JD_Integers[3]] instantly to JD_TempPoint[2]
                    • Else - Actions
                  • Set VariableSet JD_ReachedDistance[JD_Integers[3]] = (JD_ReachedDistance[JD_Integers[3]] + JD_SpeedUnits[JD_Integers[3]])
                  • Set VariableSet JD_RealTimer[JD_Integers[3]] = (JD_RealTimer[JD_Integers[3]] + (180.00 / (JD_Distances[JD_Integers[3]] / JD_SpeedUnits[JD_Integers[3]])))
                  • Set VariableSet JD_JumpHigh[JD_Integers[3]] = ((Sin(JD_RealTimer[JD_Integers[3]])) x JD_HighSettings[JD_Integers[3]])
                  • Animation - Change JD_Unit[JD_Integers[3]] flying height to JD_JumpHigh[JD_Integers[3]] at 1000000000.00
                  • Custom script: call RemoveLocation (udg_JD_TempPoint[1])
                  • Custom script: call RemoveLocation (udg_JD_TempPoint[2])
                • Else - Actions
                  • Unit Group - Remove JD_Unit[JD_Integers[3]] from JD_Group.
                  • Animation - Reset JD_Unit[JD_Integers[3]]'s animation
                  • Unit - Turn collision for JD_Unit[JD_Integers[3]] On.
                  • Set VariableSet JD_RealTimer[JD_Integers[3]] = 0.00
                  • -------- --------
                  • Set VariableSet Toss_Point[1] = (Position of JD_Unit[JD_Integers[3]])
                  • Destructible - Pick every destructible within 275.00 of Toss_Point[1] and do (Destructible - Kill (Picked destructible))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (JD_Unit[JD_Integers[3]] belongs to an enemy of (Owner of Toss_Caster[JD_Integers[3]]).) Equal to True
                    • Then - Actions
                      • Unit - Cause Toss_Caster[JD_Integers[3]] to damage JD_Unit[JD_Integers[3]], dealing (Toss_Damage[JD_Integers[3]] x 1.30) damage of attack type Spells and damage type Magic
                    • Else - Actions
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 275.00 of Toss_Point[1].) and do (Actions)
                    • Loop - Actions
                      • Set VariableSet Toss_UnitTemp = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Toss_UnitTemp is alive) Equal to True
                          • (Toss_UnitTemp is A structure) Equal to False
                          • (Toss_UnitTemp belongs to an enemy of (Owner of Toss_Caster[JD_Integers[3]]).) Equal to True
                          • Toss_UnitTemp Not equal to JD_Unit[JD_Integers[3]]
                        • Then - Actions
                          • Unit - Cause Toss_Caster[JD_Integers[3]] to damage Toss_UnitTemp, dealing Toss_Damage[JD_Integers[3]] damage of attack type Spells and damage type Magic
                        • Else - Actions
                  • Special Effect - Create a special effect at Toss_Point[1] using war3mapImported\warstompcaster.mdx
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Destroy Toss_SFX[JD_Integers[3]]
                  • Custom script: call RemoveLocation(udg_Toss_Point[1])
                  • -------- --------
                  • Set VariableSet JD_Integers[1] = (JD_Integers[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • JD_Integers[1] Equal to 0
                    • Then - Actions
                      • Set VariableSet JD_Integers[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top