• 🏆 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!

[Trigger] location bug/error whatever

Status
Not open for further replies.
Level 3
Joined
Apr 28, 2009
Messages
44
hello, im having a problem with my custom spell, again >.>
so lets start with my triggers
  • decay
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to decay
    • Actions
      • Set caster = (Casting unit)
      • Set location = (Position of caster)
      • Set timer[1] = 0.00
      • Set timer[2] = 0.00
      • Set timer[3] = 0.00
      • Set timer[4] = 0.00
      • Set timer[5] = 0.00
      • Set timer[6] = 0.00
      • Set timer_count = 1.00
      • -------- --- --------
      • Set point_p[0] = (location offset by 200.00 towards 0.00 degrees)
      • Set point_p[1] = (location offset by 200.00 towards 90.00 degrees)
      • Set point_p[2] = (location offset by 200.00 towards 180.00 degrees)
      • Set point_p[3] = (location offset by 200.00 towards 270.00 degrees)
      • -------- --- --------
      • Set point_p[10] = (location offset by 400.00 towards 45.00 degrees)
      • Set point_p[11] = (location offset by 400.00 towards 135.00 degrees)
      • Set point_p[12] = (location offset by 400.00 towards 225.00 degrees)
      • Set point_p[13] = (location offset by 400.00 towards 315.00 degrees)
      • -------- --- --------
      • Set point_p[20] = (location offset by 600.00 towards 0.00 degrees)
      • Set point_p[21] = (location offset by 600.00 towards 90.00 degrees)
      • Set point_p[22] = (location offset by 600.00 towards 180.00 degrees)
      • Set point_p[23] = (location offset by 600.00 towards 270.00 degrees)
      • -------- --- --------
      • Trigger - Turn on decay loop <gen>
  • decay loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set timer[1] = (timer[1] + 1.00)
      • Set timer[2] = (timer[2] + 1.00)
      • Set timer[3] = (timer[3] + 1.00)
      • Set timer[4] = (timer[4] + 1.00)
      • Set timer[5] = (timer[5] + 1.00)
      • Set timer[6] = (timer[6] + 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • timer[1] Equal to 1.00
        • Then - Actions
          • Special Effect - Create a special effect at point_p[0] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
          • Set destroy_effect[0] = (Last created special effect)
          • Special Effect - Create a special effect at point_p[1] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
          • Set destroy_effect[1] = (Last created special effect)
          • Special Effect - Create a special effect at point_p[2] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
          • Set destroy_effect[2] = (Last created special effect)
          • Special Effect - Create a special effect at point_p[3] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
          • Set destroy_effect[3] = (Last created special effect)
        • Else - Actions
          • Special Effect - Destroy destroy_effect[0]
          • Special Effect - Destroy destroy_effect[1]
          • Special Effect - Destroy destroy_effect[2]
          • Special Effect - Destroy destroy_effect[3]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • timer[2] Equal to 10.00
            • Then - Actions
              • Special Effect - Create a special effect at point_p[10] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
              • Set destroy_effect[0] = (Last created special effect)
              • Special Effect - Create a special effect at point_p[11] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
              • Set destroy_effect[1] = (Last created special effect)
              • Special Effect - Create a special effect at point_p[12] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
              • Set destroy_effect[2] = (Last created special effect)
              • Special Effect - Create a special effect at point_p[13] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
              • Set destroy_effect[3] = (Last created special effect)
            • Else - Actions
              • Special Effect - Destroy destroy_effect[0]
              • Special Effect - Destroy destroy_effect[1]
              • Special Effect - Destroy destroy_effect[2]
              • Special Effect - Destroy destroy_effect[3]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • timer[3] Equal to 20.00
                • Then - Actions
                  • Special Effect - Create a special effect at point_p[20] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
                  • Set destroy_effect[0] = (Last created special effect)
                  • Special Effect - Create a special effect at point_p[21] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
                  • Set destroy_effect[1] = (Last created special effect)
                  • Special Effect - Create a special effect at point_p[22] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
                  • Set destroy_effect[2] = (Last created special effect)
                  • Special Effect - Create a special effect at point_p[23] using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
                  • Set destroy_effect[3] = (Last created special effect)
                • Else - Actions
                  • Special Effect - Destroy destroy_effect[0]
                  • Special Effect - Destroy destroy_effect[1]
                  • Special Effect - Destroy destroy_effect[2]
                  • Special Effect - Destroy destroy_effect[3]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • timer[4] Equal to 60.00
                    • Then - Actions
                      • -------- --- --------
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[0] facing Default building facing degrees
                      • Set destroy_unit[0] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[1] facing Default building facing degrees
                      • Set destroy_unit[1] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[2] facing Default building facing degrees
                      • Set destroy_unit[2] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[3] facing Default building facing degrees
                      • Set destroy_unit[3] = (Last created unit)
                      • -------- --- --------
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[10] facing Default building facing degrees
                      • Set destroy_unit[10] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[11] facing Default building facing degrees
                      • Set destroy_unit[11] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[12] facing Default building facing degrees
                      • Set destroy_unit[12] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[13] facing Default building facing degrees
                      • Set destroy_unit[13] = (Last created unit)
                      • -------- --- --------
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[20] facing Default building facing degrees
                      • Set destroy_unit[20] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[21] facing Default building facing degrees
                      • Set destroy_unit[21] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[22] facing Default building facing degrees
                      • Set destroy_unit[22] = (Last created unit)
                      • Unit - Create 1 dummy for (Owner of caster) at point_p[23] facing Default building facing degrees
                      • Set destroy_unit[23] = (Last created unit)
                      • -------- --- --------
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • timer[5] Greater than or equal to 100.00
                        • Then - Actions
                          • Unit - Remove destroy_unit[0] from the game
                          • Unit - Remove destroy_unit[1] from the game
                          • Unit - Remove destroy_unit[2] from the game
                          • Unit - Remove destroy_unit[3] from the game
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • timer[6] Greater than or equal to 150.00
                            • Then - Actions
                              • Unit - Remove destroy_unit[10] from the game
                              • Unit - Remove destroy_unit[11] from the game
                              • Unit - Remove destroy_unit[12] from the game
                              • Unit - Remove destroy_unit[13] from the game
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • timer[6] Greater than or equal to 200.00
                                • Then - Actions
                                  • Unit - Remove destroy_unit[20] from the game
                                  • Unit - Remove destroy_unit[21] from the game
                                  • Unit - Remove destroy_unit[22] from the game
                                  • Unit - Remove destroy_unit[23] from the game
                                • Else - Actions
                                  • -------- --- --------
                                  • Custom script: call RemoveLocation(udg_point_p[0])
                                  • Custom script: call RemoveLocation(udg_point_p[1])
                                  • Custom script: call RemoveLocation(udg_point_p[2])
                                  • Custom script: call RemoveLocation(udg_point_p[3])
                                  • -------- --- --------
                                  • Custom script: call RemoveLocation(udg_point_p[10])
                                  • Custom script: call RemoveLocation(udg_point_p[11])
                                  • Custom script: call RemoveLocation(udg_point_p[12])
                                  • Custom script: call RemoveLocation(udg_point_p[13])
                                  • -------- --- --------
                                  • Custom script: call RemoveLocation(udg_point_p[20])
                                  • Custom script: call RemoveLocation(udg_point_p[21])
                                  • Custom script: call RemoveLocation(udg_point_p[22])
                                  • Custom script: call RemoveLocation(udg_point_p[23])
                                  • -------- --- --------
                                  • Custom script: call RemoveLocation(udg_location)
                                  • -------- --- --------
                                  • Trigger - Turn off decay loop <gen>
the problem is, when i added the custom scripts to remove my leaks it my whole spell stopped working expect for the first 4 special effects, any idea how this is fixed?
i added my map.
 

Attachments

  • some spell.w3x
    20.4 KB · Views: 49
Level 3
Joined
Apr 28, 2009
Messages
44
should look a little like this. but then with
400 and 600 range at the polar offset.
  • sample
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to sample
    • Actions
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 0.00 degrees) using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 90.00 degrees) using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 180.00 degrees) using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 270.00 degrees) using Abilities\Spells\Items\OrbCorruption\OrbCorruption.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 2.00 seconds
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 0.00 degrees) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Set special_effect[0] = (Last created special effect)
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 90.00 degrees) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Set special_effect[1] = (Last created special effect)
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 180.00 degrees) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Set special_effect[2] = (Last created special effect)
      • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 200.00 towards 270.00 degrees) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Set special_effect[3] = (Last created special effect)
      • Wait 5.00 seconds
      • Special Effect - Destroy special_effect[0]
      • Special Effect - Destroy special_effect[1]
      • Special Effect - Destroy special_effect[2]
      • Special Effect - Destroy special_effect[3]
of course its very leaky now etc but its just for the effects so try it plz.
 

Attachments

  • sample.w3x
    16.9 KB · Views: 51
Status
Not open for further replies.
Top