• 🏆 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] Abilities are Multipled Used

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hi, I got 2 of spells, that f0rsAk3n gave me, i CnP'd the first spell and edited the model file of the dummy.

Then there got a problem. When i go ingame and press one of the abilities, bot will happen At the same time

  • Storm Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • -------- ============================== --------
      • -------- Casting Unit --------
      • -------- ============================== --------
      • Set Temp_Unit[2] = (Triggering unit)
      • Animation - Play Temp_Unit[2]'s Victory animation
      • -------- ============================== --------
      • -------- Position of Casting Unit --------
      • -------- ============================== --------
      • Set Temp_Pos[1] = (Position of (Triggering unit))
      • -------- ============================== --------
      • -------- The angle he's facing, aka the angle the storm bolt will fly :P --------
      • -------- ============================== --------
      • Set Temp_Real = (Facing of (Triggering unit))
      • -------- ============================== --------
      • -------- The offset, so the the unit dont get summoned in the middle of the hero. --------
      • -------- ============================== --------
      • Set Temp_Pos[2] = (Temp_Pos[1] offset by 80.00 towards Temp_Real degrees)
      • -------- ============================== --------
      • -------- Setting up the storm Bolt, change the Generic Expiration timer to make it go further --------
      • -------- ============================== --------
      • Unit - Create 1 Dummy - Hammer for (Owner of (Triggering unit)) at Temp_Pos[2] facing Temp_Real degrees
      • Unit - Add a 2.20 second Generic expiration timer to (Last created unit)
      • Unit - Turn collision for (Last created unit) Off
      • -------- ============================== --------
      • -------- Turning on the Loop Trigger. --------
      • -------- ============================== --------
      • Trigger - Turn on Storm Bolt Loop <gen>
      • -------- ============================== --------
      • -------- Removing Leaks! Leaks FAIL --------
      • -------- ============================== --------
      • Custom script: call RemoveLocation(udg_Temp_Pos[1])
      • Custom script: call RemoveLocation(udg_Temp_Pos[2])
  • Storm Bolt Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ============================== --------
      • -------- Setting the Unit group, meaning we will move all units of type "Hammer" --------
      • -------- ============================== --------
      • Set Temp_Group = (Units of type Dummy - Hammer)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in Temp_Group and do (Actions)
            • Loop - Actions
              • -------- ============================== --------
              • -------- Setting the angles and offsets --------
              • -------- ============================== --------
              • Set Temp_Pos[1] = (Position of (Picked unit))
              • Set Temp_Pos[2] = (Temp_Pos[1] offset by 20.00 towards (Facing of (Picked unit)) degrees)
              • -------- ============================== --------
              • -------- Moving the unit, and setting up the unit group, should it have reached a unit --------
              • -------- ============================== --------
              • Unit - Move (Picked unit) instantly to Temp_Pos[2]
              • Set Temp_Unit[0] = (Picked unit)
              • Set Temp_Damage = (Units within 60.00 of Temp_Pos[2])
              • Unit Group - Pick every unit in Temp_Damage and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) belongs to an enemy of (Owner of Temp_Unit[0])) Equal to True
                    • Then - Actions
                      • -------- ============================== --------
                      • -------- Setting up the unit it had reached --------
                      • -------- ============================== --------
                      • Set Temp_Unit[1] = (Picked unit)
                      • -------- ============================== --------
                      • -------- Some effects :P :P :P --------
                      • -------- ============================== --------
                      • Special Effect - Create a special effect at Temp_Pos[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • -------- ============================== --------
                      • -------- Killing storm bolt and turning on the damage trigger. --------
                      • -------- ============================== --------
                      • Unit - Kill Temp_Unit[0]
                      • Trigger - Turn on Storm Bolt Damage <gen>
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Unit[0] is alive) Equal to False
                • Then - Actions
                  • -------- ============================== --------
                  • -------- Removing Storm Bolt from the game --------
                  • -------- ============================== --------
                  • Unit - Remove Temp_Unit[0] from the game
                • Else - Actions
              • -------- ============================== --------
              • -------- Removing all the leaks. --------
              • -------- ============================== --------
              • Custom script: call DestroyGroup(udg_Temp_Damage)
              • Custom script: call RemoveLocation(udg_Temp_Pos[1])
              • Custom script: call RemoveLocation(udg_Temp_Pos[2])
        • Else - Actions
          • -------- ============================== --------
          • -------- Turning off this trigger for good mesure :P --------
          • -------- ============================== --------
          • Trigger - Turn off (This trigger)
      • -------- ============================== --------
      • -------- Remove Group leak --------
      • -------- ============================== --------
      • Custom script: call DestroyGroup(udg_Temp_Group)
  • Storm Bolt Damage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- ============================== --------
      • -------- Sets the position, and also makes the counter +1, so its knows when to stop --------
      • -------- ============================== --------
      • Set Temp_Pos[3] = (Position of Temp_Unit[1])
      • Set Temp_Counter[1] = (Temp_Counter[1] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Temp_Unit[1] is A structure) Equal to False
          • (Temp_Unit[1] is alive) Equal to True
          • Temp_Counter[1] Less than 5
        • Then - Actions
          • -------- ============================== --------
          • -------- Creates the dummy unit, this is for SLOW only. If you want it to reduce atc speed aswell, just change it in the dummy spell --------
          • -------- ============================== --------
          • Unit - Create 1 Dummy - Slow for (Owner of Temp_Unit[2]) at Temp_Pos[3] facing Default building facing degrees
          • Unit - Set level of Storm Bolt for (Last created unit) to 1
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Human Sorceress - Slow Temp_Unit[1]
          • -------- ============================== --------
          • -------- These are effects i used. You can use your own or none. Either way it doesnt bother me :P :P --------
          • -------- ============================== --------
          • Special Effect - Create a special effect attached to the origin of Temp_Unit[1] using war3mapImported\LightningWrath.mdx
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of Temp_Unit[1] using Abilities\Weapons\Bolt\BoltImpact.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- ============================== --------
          • -------- The folowing is the damage dealth per second. Set it to watever you want. --------
          • -------- ============================== --------
          • Unit - Cause Temp_Unit[2] to damage Temp_Unit[1], dealing ((Random real number between 20.00 and 40.00) x (Real((Level of Storm Bolt for Temp_Unit[2])))) damage of attack type Spells and damage type Normal
        • Else - Actions
          • -------- ============================== --------
          • -------- Resets counter & turns off this trigger --------
          • -------- ============================== --------
          • Set Temp_Counter[1] = 0
          • Trigger - Turn off (This trigger)
      • Custom script: call DestroyGroup(udg_Temp_Damage)
  • Fire Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Bolt
    • Actions
      • -------- ============================== --------
      • -------- Casting Unit --------
      • -------- ============================== --------
      • Set Temp_Unit[2] = (Triggering unit)
      • Animation - Play Temp_Unit[2]'s Victory animation
      • -------- ============================== --------
      • -------- Position of Casting Unit --------
      • -------- ============================== --------
      • Set Temp_Pos[1] = (Position of (Triggering unit))
      • -------- ============================== --------
      • -------- The angle he's facing, aka the angle the storm bolt will fly :P --------
      • -------- ============================== --------
      • Set Temp_Real = (Facing of (Triggering unit))
      • -------- ============================== --------
      • -------- The offset, so the the unit dont get summoned in the middle of the hero. --------
      • -------- ============================== --------
      • Set Temp_Pos[2] = (Temp_Pos[1] offset by 80.00 towards Temp_Real degrees)
      • -------- ============================== --------
      • -------- Setting up the storm Bolt, change the Generic Expiration timer to make it go further --------
      • -------- ============================== --------
      • Unit - Create 1 Dummy - Fire for (Owner of (Triggering unit)) at Temp_Pos[2] facing Temp_Real degrees
      • Unit - Add a 2.20 second Generic expiration timer to (Last created unit)
      • Unit - Turn collision for (Last created unit) Off
      • -------- ============================== --------
      • -------- Turning on the Loop Trigger. --------
      • -------- ============================== --------
      • Trigger - Turn on Fire Bolt Loop <gen>
      • -------- ============================== --------
      • -------- Removing Leaks! Leaks FAIL --------
      • -------- ============================== --------
      • Custom script: call RemoveLocation(udg_Temp_Pos[1])
      • Custom script: call RemoveLocation(udg_Temp_Pos[2])
  • Fire Bolt Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ============================== --------
      • -------- Setting the Unit group, meaning we will move all units of type "Hammer" --------
      • -------- ============================== --------
      • Set Temp_Group = (Units of type Dummy - Fire)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in Temp_Group and do (Actions)
            • Loop - Actions
              • -------- ============================== --------
              • -------- Setting the angles and offsets --------
              • -------- ============================== --------
              • Set Temp_Pos[1] = (Position of (Picked unit))
              • Set Temp_Pos[2] = (Temp_Pos[1] offset by 20.00 towards (Facing of (Picked unit)) degrees)
              • -------- ============================== --------
              • -------- Moving the unit, and setting up the unit group, should it have reached a unit --------
              • -------- ============================== --------
              • Unit - Move (Picked unit) instantly to Temp_Pos[2]
              • Set Temp_Unit[0] = (Picked unit)
              • Set Temp_Damage = (Units within 60.00 of Temp_Pos[2])
              • Unit Group - Pick every unit in Temp_Damage and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) belongs to an enemy of (Owner of Temp_Unit[0])) Equal to True
                    • Then - Actions
                      • -------- ============================== --------
                      • -------- Setting up the unit it had reached --------
                      • -------- ============================== --------
                      • Set Temp_Unit[1] = (Picked unit)
                      • -------- ============================== --------
                      • -------- Some effects :P :P :P --------
                      • -------- ============================== --------
                      • Special Effect - Create a special effect at Temp_Pos[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • -------- ============================== --------
                      • -------- Killing storm bolt and turning on the damage trigger. --------
                      • -------- ============================== --------
                      • Unit - Kill Temp_Unit[0]
                      • Trigger - Turn on Fire Bolt Loop <gen>
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Unit[0] is alive) Equal to False
                • Then - Actions
                  • -------- ============================== --------
                  • -------- Removing Storm Bolt from the game --------
                  • -------- ============================== --------
                  • Unit - Remove Temp_Unit[0] from the game
                • Else - Actions
              • -------- ============================== --------
              • -------- Removing all the leaks. --------
              • -------- ============================== --------
              • Custom script: call DestroyGroup(udg_Temp_Damage)
              • Custom script: call RemoveLocation(udg_Temp_Pos[1])
              • Custom script: call RemoveLocation(udg_Temp_Pos[2])
        • Else - Actions
          • -------- ============================== --------
          • -------- Turning off this trigger for good mesure :P --------
          • -------- ============================== --------
          • Trigger - Turn off (This trigger)
      • -------- ============================== --------
      • -------- Remove Group leak --------
      • -------- ============================== --------
      • Custom script: call DestroyGroup(udg_Temp_Group)
  • Fire Bolt Damage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- ============================== --------
      • -------- Sets the position, and also makes the counter +1, so its knows when to stop --------
      • -------- ============================== --------
      • Set Temp_Pos[4] = (Position of Temp_Unit[1])
      • Set Temp_Counter[2] = (Temp_Counter[2] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Temp_Unit[1] is A structure) Equal to False
          • (Temp_Unit[1] is alive) Equal to True
          • Temp_Counter[2] Less than 10
        • Then - Actions
          • -------- ============================== --------
          • -------- These are effects i used. You can use your own or none. Either way it doesnt bother me :P :P --------
          • -------- ============================== --------
          • Special Effect - Create a special effect attached to the origin of Temp_Unit[1] using war3mapImported\LightningWrath.mdx
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of Temp_Unit[1] using Abilities\Weapons\Bolt\BoltImpact.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- ============================== --------
          • -------- The folowing is the damage dealth per second. Set it to watever you want. --------
          • -------- ============================== --------
          • Unit - Cause Temp_Unit[2] to damage Temp_Unit[1], dealing ((Random real number between 15.00 and 20.00) x (Real((Level of Fire Bolt for Temp_Unit[2])))) damage of attack type Spells and damage type Normal
        • Else - Actions
          • -------- ============================== --------
          • -------- Resets counter & turns off this trigger --------
          • -------- ============================== --------
          • Set Temp_Counter[2] = 0
          • Trigger - Turn off (This trigger)
      • Custom script: call DestroyGroup(udg_Temp_Damage)

Even the model's gets inside each other. But the spell itself is working.

What is the problem?
 
Status
Not open for further replies.
Top