• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Dummy model disappearing

Status
Not open for further replies.
Level 5
Joined
May 12, 2014
Messages
133
So... I think I just made the most complicated spell of my life, and everything actually works perfectly! But, the problem is that dummies being reused suddenly become invisible and their effect isn't seen! It's the orc demolisher missile. When the dummy is being reused to create a "boom" effect, it turns invisible and I can't figure out why. But when the dummy is first created, it works perfectly. Really lost... I'll include my map too just in case, since some of the actions in here are pretty map specific. No reservations here. :)

The Marine launches several rockets high into the air that crash back down towards where he aimed at in a line. Each rocket deals 80% of the marine's attack damage.

Level 1 - 800 range, 4 rockets
Level 2 - 1200 range, 6 rockets
Level 3 - 1600 range, 8 rockets
Level 4 - 2000 range, 10 rockets
Level 5 - 2400 range, 12 rockets

Target Type: Point
Damage Type: Physical
Cooldown: 12/11/10/9/8


  • Rocket Storm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rocket Storm (\/\/)
    • Actions
      • Set Rocket_Storm_Loop1_Max = (Rocket_Storm_Loop1_Max + 1)
      • Set Rocket_Storm_C1[Rocket_Storm_Loop1_Max] = (Triggering unit)
      • Set Rocket_Storm_Counter[Rocket_Storm_Loop1_Max] = 0
      • Set Rocket_Storm_Counter_Limit[Rocket_Storm_Loop1_Max] = (2 + (2 x (Level of Rocket Storm (\/\/) for Rocket_Storm_C1[Rocket_Storm_Loop1_Max])))
      • Set Rocket_Storm_P1[Rocket_Storm_Loop1_Max] = (Position of (Triggering unit))
      • Set Rocket_Storm_P2[0] = (Target point of ability being cast)
      • Set Rocket_Storm_Angle[Rocket_Storm_Loop1_Max] = (Angle from Rocket_Storm_P1[Rocket_Storm_Loop1_Max] to Rocket_Storm_P2[0])
      • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[0])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Rocket Storm Loop 1 <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on Rocket Storm Loop 1 <gen>
        • Else - Actions
  • Rocket Storm Loop 1
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Rocket_Storm_Loop1) from 1 to Rocket_Storm_Loop1_Max, do (Actions)
        • Loop - Actions
          • Set Rocket_Storm_Counter[Rocket_Storm_Loop1] = (Rocket_Storm_Counter[Rocket_Storm_Loop1] + 1)
          • Set Rocket_Storm_P2[0] = (Position of Rocket_Storm_C1[Rocket_Storm_Loop1])
          • -------- Loop 2 Variables Set-Up --------
          • Set Rocket_Storm_Loop2_Max = (Rocket_Storm_Loop2_Max + 1)
          • Set Rocket_Storm_C2[Rocket_Storm_Loop2_Max] = Rocket_Storm_C1[Rocket_Storm_Loop1]
          • Set Rocket_Storm_Timer[Rocket_Storm_Loop2_Max] = 0.25
          • Set Rocket_Storm_Phase[Rocket_Storm_Loop2_Max] = 1
          • -------- ---------------------------------------------------------- --------
          • -------- Rocket Set-Up --------
          • -------- 1 --------
          • Set Rocket_Storm_Rocket_Chosen = False
          • Set Rocket_Storm_T = (Units of type Rocket Storm 1 (Facing Upwards))
          • Unit Group - Pick every unit in Rocket_Storm_T and do (Actions)
            • Loop - Actions
              • Set Temp_PickedUnit = (Picked unit)
              • Set Rocket_Storm_P2[1] = (Position of Temp_PickedUnit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Rocket_Storm_Rocket_Chosen Equal to False
                  • (Reusable Doodads <gen> contains Rocket_Storm_P2[1]) Equal to True
                • Then - Actions
                  • Set Rocket_Storm_Rockets1[Rocket_Storm_Loop2_Max] = Temp_PickedUnit
                  • Set Rocket_Storm_Rocket_Chosen = True
                  • Unit - Move Rocket_Storm_Rockets1[Rocket_Storm_Loop2_Max] instantly to Rocket_Storm_P2[0]
                • Else - Actions
              • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[1])
          • Custom script: call DestroyGroup (udg_Rocket_Storm_T)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Rocket_Storm_Rocket_Chosen Equal to False
            • Then - Actions
              • Unit - Create 1 Rocket Storm 1 (Facing Upwards) for Neutral Passive at Rocket_Storm_P2[0] facing Default building facing degrees
              • Set Rocket_Storm_Rockets1[Rocket_Storm_Loop2_Max] = (Last created unit)
            • Else - Actions
          • Animation - Change Rocket_Storm_Rockets1[Rocket_Storm_Loop2_Max] flying height to 1000.00 at 4000.00
          • -------- 2 --------
          • Set Rocket_Storm_P2[2] = (Rocket_Storm_P1[Rocket_Storm_Loop1] offset by (200.00 x (Real(Rocket_Storm_Counter[Rocket_Storm_Loop1]))) towards Rocket_Storm_Angle[Rocket_Storm_Loop1] degrees)
          • Set Rocket_Storm_X = (X of Rocket_Storm_P2[2])
          • Set Rocket_Storm_Y = (Y of Rocket_Storm_P2[2])
          • Set Rocket_Storm_Rocket_Chosen = False
          • Set Rocket_Storm_T = (Units of type Rocket Storm 2 (Facing Downwards))
          • Unit Group - Pick every unit in Rocket_Storm_T and do (Actions)
            • Loop - Actions
              • Set Temp_PickedUnit = (Picked unit)
              • Set Rocket_Storm_P2[1] = (Position of Temp_PickedUnit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Rocket_Storm_Rocket_Chosen Equal to False
                  • (Reusable Doodads <gen> contains Rocket_Storm_P2[1]) Equal to True
                • Then - Actions
                  • Set Rocket_Storm_Rockets2[Rocket_Storm_Loop2_Max] = Temp_PickedUnit
                  • Set Rocket_Storm_Rocket_Chosen = True
                • Else - Actions
              • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[1])
          • Custom script: call DestroyGroup (udg_Rocket_Storm_T)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Rocket_Storm_Rocket_Chosen Equal to False
            • Then - Actions
              • Unit - Create 1 Rocket Storm 2 (Facing Downwards) for Neutral Passive at Rocket_Storm_P2[2] facing Default building facing degrees
              • Set Rocket_Storm_Rockets2[Rocket_Storm_Loop2_Max] = (Last created unit)
            • Else - Actions
          • Custom script: call SetUnitX(udg_Rocket_Storm_Rockets2[udg_Rocket_Storm_Loop2_Max],udg_Rocket_Storm_X)
          • Custom script: call SetUnitY(udg_Rocket_Storm_Rockets2[udg_Rocket_Storm_Loop2_Max],udg_Rocket_Storm_Y)
          • Animation - Change Rocket_Storm_Rockets2[Rocket_Storm_Loop2_Max]'s vertex coloring to (0.00%, 0.00%, 0.00%) with 100.00% transparency
          • Animation - Change Rocket_Storm_Rockets2[Rocket_Storm_Loop2_Max] flying height to 1000.00 at 0.00
          • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[2])
          • -------- ---------------------------------------------------------- --------
          • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[0])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Rocket Storm Loop 2 <gen> is on) Not equal to True
            • Then - Actions
              • Trigger - Turn on Rocket Storm Loop 2 <gen>
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Rocket_Storm_Counter[Rocket_Storm_Loop1] Equal to Rocket_Storm_Counter_Limit[Rocket_Storm_Loop1]
            • Then - Actions
              • -------- DE-INDEX --------
              • Set Rocket_Storm_C1[Rocket_Storm_Loop1] = Rocket_Storm_C1[Rocket_Storm_Loop1_Max]
              • Set Rocket_Storm_Counter[Rocket_Storm_Loop1] = Rocket_Storm_Counter[Rocket_Storm_Loop1_Max]
              • Set Rocket_Storm_Counter_Limit[Rocket_Storm_Loop1] = Rocket_Storm_Counter_Limit[Rocket_Storm_Loop1_Max]
              • Set Rocket_Storm_Angle[Rocket_Storm_Loop1] = Rocket_Storm_Angle[Rocket_Storm_Loop1_Max]
              • Set Rocket_Storm_Loop1 = (Rocket_Storm_Loop1 - 1)
              • Set Rocket_Storm_Loop1_Max = (Rocket_Storm_Loop1_Max - 1)
              • Custom script: call RemoveLocation (udg_Rocket_Storm_P1[udg_Rocket_Storm_Loop1])
              • Set Rocket_Storm_P1[Rocket_Storm_Loop1] = (Rocket_Storm_P1[Rocket_Storm_Loop1_Max] offset by (0.00, 0.00))
              • Custom script: call RemoveLocation (udg_Rocket_Storm_P1[udg_Rocket_Storm_Loop1_Max])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Rocket_Storm_Loop1_Max Less than or equal to 0
                • Then - Actions
                  • Custom script: call RemoveLocation (udg_Rocket_Storm_P1[1])
                  • Trigger - Turn off Rocket Storm Loop 1 <gen>
                • Else - Actions
            • Else - Actions
  • Rocket Storm Loop 2
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Rocket_Storm_Loop2) from 1 to Rocket_Storm_Loop2_Max, do (Actions)
        • Loop - Actions
          • Set Rocket_Storm_Timer[Rocket_Storm_Loop2] = (Rocket_Storm_Timer[Rocket_Storm_Loop2] - 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Rocket_Storm_Timer[Rocket_Storm_Loop2] Less than or equal to 0.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Rocket_Storm_Phase[Rocket_Storm_Loop2] Equal to 1
                • Then - Actions
                  • -------- Clean the upwards rocket and activate the downwards one --------
                  • Set Rocket_Storm_Timer[Rocket_Storm_Loop2] = 0.25
                  • Set Rocket_Storm_Phase[Rocket_Storm_Loop2] = 2
                  • Set Rocket_Storm_P2[0] = (Center of Reusable Doodads <gen>)
                  • Unit - Move Rocket_Storm_Rockets1[Rocket_Storm_Loop2] instantly to Rocket_Storm_P2[0]
                  • Animation - Change Rocket_Storm_Rockets1[Rocket_Storm_Loop2] flying height to 0.00 at 0.00
                  • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[0])
                  • Animation - Change Rocket_Storm_Rockets2[Rocket_Storm_Loop2]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • Animation - Change Rocket_Storm_Rockets2[Rocket_Storm_Loop2] flying height to 0.00 at 4000.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Rocket_Storm_Phase[Rocket_Storm_Loop2] Equal to 2
                    • Then - Actions
                      • -------- Damage enemies in the area around the downwards rockets, then create an explosion effect --------
                      • Set Rocket_Storm_Timer[Rocket_Storm_Loop2] = 3.00
                      • Set Rocket_Storm_Phase[Rocket_Storm_Loop2] = 3
                      • Set Temp_Int2 = (Player number of (Owner of Rocket_Storm_C2[Rocket_Storm_Loop2]))
                      • Set Rocket_Storm_P2[1] = (Position of Rocket_Storm_Rockets2[Rocket_Storm_Loop2])
                      • Set Rocket_Storm_X = (X of Rocket_Storm_P2[1])
                      • Set Rocket_Storm_Y = (Y of Rocket_Storm_P2[1])
                      • Set Rocket_Storm_Rocket_Chosen = False
                      • Set Rocket_Storm_T = (Units of type Rocket Storm 3 (Explosion FX))
                      • Unit Group - Pick every unit in Rocket_Storm_T and do (Actions)
                        • Loop - Actions
                          • Set Temp_PickedUnit = (Picked unit)
                          • Set Rocket_Storm_P2[2] = (Position of Temp_PickedUnit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Rocket_Storm_Rocket_Chosen Equal to False
                              • (Reusable Doodads <gen> contains Rocket_Storm_P2[2]) Equal to True
                            • Then - Actions
                              • Set Rocket_Storm_Rockets3[Rocket_Storm_Loop2] = Temp_PickedUnit
                              • Set Rocket_Storm_Rocket_Chosen = True
                            • Else - Actions
                          • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[2])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Rocket_Storm_Rocket_Chosen Equal to False
                        • Then - Actions
                          • Unit - Create 1 Rocket Storm 3 (Explosion FX) for Neutral Passive at Rocket_Storm_P2[1] facing Default building facing degrees
                          • Set Rocket_Storm_Rockets3[Rocket_Storm_Loop2] = (Last created unit)
                        • Else - Actions
                      • Custom script: call DestroyGroup (udg_Rocket_Storm_T)
                      • Custom script: call SetUnitX(udg_Rocket_Storm_Rockets3[udg_Rocket_Storm_Loop2],udg_Rocket_Storm_X)
                      • Custom script: call SetUnitY(udg_Rocket_Storm_Rockets3[udg_Rocket_Storm_Loop2],udg_Rocket_Storm_Y)
                      • Animation - Play Rocket_Storm_Rockets3[Rocket_Storm_Loop2]'s death animation
                      • -------- Damage Event Here --------
                      • Set Rocket_Storm_T = (Units within 200.00 of Rocket_Storm_P2[1])
                      • Unit Group - Pick every unit in Rocket_Storm_T and do (Actions)
                        • Loop - Actions
                          • Set Temp_PickedUnit = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_PickedUnit is A structure) Not equal to True
                              • (Temp_PickedUnit is dead) Not equal to True
                              • (Temp_PickedUnit is Magic Immune) Not equal to True
                              • (Temp_PickedUnit belongs to an enemy of (Owner of Rocket_Storm_C2[Rocket_Storm_Loop2])) Equal to True
                            • Then - Actions
                              • Unit - Cause Rocket_Storm_C2[Rocket_Storm_Loop2] to damage Temp_PickedUnit, dealing ((Random real number between (Real(Player_Heroes_DamageMin[Temp_Int2])) and (Real(Player_Heroes_DamageMax[Temp_Int2]))) x 0.80) damage of attack type Spells and damage type Normal
                            • Else - Actions
                      • Custom script: call DestroyGroup (udg_Rocket_Storm_T)
                      • -------- ----------------------------------------------------------- --------
                      • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[1])
                      • Set Rocket_Storm_P2[0] = (Center of Reusable Doodads <gen>)
                      • Unit - Move Rocket_Storm_Rockets2[Rocket_Storm_Loop2] instantly to Rocket_Storm_P2[0]
                      • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[0])
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Rocket_Storm_Phase[Rocket_Storm_Loop2] Equal to 3
                        • Then - Actions
                          • -------- DE-INDEX --------
                          • Animation - Reset Rocket_Storm_Rockets3[Rocket_Storm_Loop2]'s animation
                          • Set Rocket_Storm_P2[0] = (Random point in Reusable Doodads <gen>)
                          • Unit - Move Rocket_Storm_Rockets3[Rocket_Storm_Loop2] instantly to Rocket_Storm_P2[0]
                          • Custom script: call RemoveLocation (udg_Rocket_Storm_P2[0])
                          • -------- De-Indexing below --------
                          • Set Rocket_Storm_C2[Rocket_Storm_Loop2] = Rocket_Storm_C2[Rocket_Storm_Loop2_Max]
                          • Set Rocket_Storm_Timer[Rocket_Storm_Loop2] = Rocket_Storm_Timer[Rocket_Storm_Loop2_Max]
                          • Set Rocket_Storm_Phase[Rocket_Storm_Loop2] = Rocket_Storm_Phase[Rocket_Storm_Loop2_Max]
                          • Set Rocket_Storm_Rockets1[Rocket_Storm_Loop2] = Rocket_Storm_Rockets1[Rocket_Storm_Loop2_Max]
                          • Set Rocket_Storm_Rockets2[Rocket_Storm_Loop2] = Rocket_Storm_Rockets2[Rocket_Storm_Loop2_Max]
                          • Set Rocket_Storm_Rockets3[Rocket_Storm_Loop2] = Rocket_Storm_Rockets3[Rocket_Storm_Loop2_Max]
                          • -------- ------------------------------------------------------- --------
                          • Set Rocket_Storm_C2[Rocket_Storm_Loop2_Max] = No unit
                          • Set Rocket_Storm_Timer[Rocket_Storm_Loop2_Max] = 0.00
                          • Set Rocket_Storm_Phase[Rocket_Storm_Loop2_Max] = 0
                          • Set Rocket_Storm_Rockets1[Rocket_Storm_Loop2_Max] = No unit
                          • Set Rocket_Storm_Rockets2[Rocket_Storm_Loop2_Max] = No unit
                          • Set Rocket_Storm_Rockets3[Rocket_Storm_Loop2_Max] = No unit
                          • -------- ------------------------------------------------------- --------
                          • Set Rocket_Storm_Loop2 = (Rocket_Storm_Loop2 - 1)
                          • Set Rocket_Storm_Loop2_Max = (Rocket_Storm_Loop2_Max - 1)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Rocket_Storm_Loop2_Max Less than or equal to 0
                            • Then - Actions
                              • Trigger - Turn off Rocket Storm Loop 2 <gen>
                            • Else - Actions
                        • Else - Actions
                          • Game - Display to (All players) the text: Bug Confirmed
            • Else - Actions
 

Attachments

  • Yugata's Hero Defense v0.01.w3x
    468.7 KB · Views: 53
Level 5
Joined
May 12, 2014
Messages
133
Nevermind.... I found the problem once I realized what could have been wrong. Out of the 3 dummy units I used, THE LAST ONE FOR SOME REASON HAD A MOVEMENT SPEED OF 0. UNREAL! So, does anyone know how to get rid of this? Cause now I just feel stupid.
 
Status
Not open for further replies.
Top