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

[Solved] Need someone to make 2 knockback spells for me...

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
770
Alright I need someone to make 2 knockback spells to me for my map and they are meant to be for a single unit which is Druid of the Claw in Bear Form so there will only be 1 level for each spell. I need the knockback spell of the Spirit Breaker in Dota that works exactly the same and secondly I need a knockback spell that works like the Bear attacks all enemies infront of him when casted and damaging them and knocking them back a short distance. I hope I've explained well enough, please someone!?
 
Level 14
Joined
Jul 19, 2007
Messages
770
Well I actually found the "Greater Bash" ability from a spellpack map so I imported it to my map and it seems to be working perfect but there is still one problem... When an unit is knockedback by the Greater Bash it seems to be knockedback through destructibles and after that it seems like that unit is able to walk through every kind of destructibles, even trees :-/ Please help!

  • Maul Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Maul for (Attacking unit)) Greater than 0
      • ((Attacking unit) is in GreaterBashCooldownGroup) Not equal to True
      • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
      • ((Attacked unit) is A structure) Not equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Knockback Dummy
        • Then - Actions
          • Set GreaterBashChance = 15
        • Else - Actions
          • Set GreaterBashChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GreaterBashChance Less than or equal to 15
        • Then - Actions
          • Set GreaterBashCount = (GreaterBashCount + 1)
          • Set GreaterBashCaster[GreaterBashCount] = (Attacking unit)
          • Set GreaterBashTarget[GreaterBashCount] = (Attacked unit)
          • Set GreaterBashPoint = (Position of GreaterBashCaster[GreaterBashCount])
          • Set GreaterBashPoint1[GreaterBashCount] = (Position of GreaterBashTarget[GreaterBashCount])
          • Set GreaterBashAngle[GreaterBashCount] = (Angle from GreaterBashPoint to GreaterBashPoint1[GreaterBashCount])
          • Unit Group - Add GreaterBashCaster[GreaterBashCount] to GreaterBashCooldownGroup
          • Unit - Turn collision for GreaterBashTarget[GreaterBashCount] Off
          • Unit - Cause GreaterBashCaster[GreaterBashCount] to damage GreaterBashTarget[GreaterBashCount], dealing (40.00 x (Real((Level of Maul for GreaterBashCaster[GreaterBashCount])))) damage of attack type Normal and damage type Normal
          • Unit - Create 1 Dummy for (Owner of GreaterBashCaster[GreaterBashCount]) at GreaterBashPoint facing 270.00 degrees
          • Set GreaterBashDummy[1] = (Last created unit)
          • Unit - Add Maul Stun to GreaterBashDummy[1]
          • Unit - Set level of Maul Stun for GreaterBashDummy[1] to (Level of Maul Stun for GreaterBashCaster[GreaterBashCount])
          • Unit - Add a 1.00 second Generic expiration timer to GreaterBashDummy[1]
          • Unit - Order GreaterBashDummy[1] to Neutral - Hurl Boulder GreaterBashTarget[GreaterBashCount]
          • Custom script: call RemoveLocation (udg_GreaterBashPoint)
          • Custom script: call RemoveLocation (udg_GreaterBashPoint1[udg_GreaterBashCount])
        • Else - Actions
  • Maul Knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer GreaterBashLoop) from 1 to GreaterBashCount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GreaterBashStop[GreaterBashLoop] Not equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GreaterBashCounter[GreaterBashLoop] Less than (0.75 + (0.20 x (Real((Level of Wrath of Numenor for GreaterBashCaster[GreaterBashLoop])))))
                • Then - Actions
                  • Set GreaterBashCounter[GreaterBashLoop] = (GreaterBashCounter[GreaterBashLoop] + 0.04)
                  • Set GreaterBashPoint1[GreaterBashLoop] = (Position of GreaterBashCaster[GreaterBashLoop])
                  • Set GreaterBashPoint2[GreaterBashLoop] = (Position of GreaterBashTarget[GreaterBashLoop])
                  • Set GreaterBashPoint3[GreaterBashLoop] = (GreaterBashPoint2[GreaterBashLoop] offset by (15.00 - (GreaterBashCounter[GreaterBashLoop] x 10.00)) towards GreaterBashAngle[GreaterBashLoop] degrees)
                  • Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
                    • Loop - Actions
                      • Do nothing
                  • Special Effect - Create a special effect attached to the chest of GreaterBashTarget[GreaterBashLoop] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call SetUnitX(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationX(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
                  • Custom script: call SetUnitY(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationY(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
                  • Custom script: call RemoveLocation (udg_GreaterBashPoint1[udg_GreaterBashLoop])
                  • Custom script: call RemoveLocation (udg_GreaterBashPoint2[udg_GreaterBashLoop])
                  • Custom script: call RemoveLocation (udg_GreaterBashPoint3[udg_GreaterBashLoop])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GreaterBashCounter[GreaterBashLoop] Greater than or equal to (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
                    • Then - Actions
                      • Set GreaterBashStop[GreaterBashLoop] = 1
                      • Unit - Turn collision for GreaterBashTarget[GreaterBashLoop] Off
                      • Set GreaterBashTarget[GreaterBashLoop] = No unit
                    • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GreaterBashCooldownStop[GreaterBashLoop] Not equal to 1
            • Then - Actions
              • Set GreaterBashCooldown[GreaterBashLoop] = (GreaterBashCooldown[GreaterBashLoop] + 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GreaterBashCooldown[GreaterBashLoop] Greater than or equal to 1.50
                • Then - Actions
                  • Set GreaterBashCooldownStop[GreaterBashLoop] = 1
                  • Unit Group - Remove GreaterBashCaster[GreaterBashLoop] from GreaterBashCooldownGroup
                  • Set GreaterBashCaster[GreaterBashLoop] = No unit
                • Else - Actions
            • Else - Actions
 
Level 25
Joined
May 11, 2007
Messages
4,651
Why are you picking every destructible with the GreaterBashPoint3 and then doing it nothing with them?

Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
  • empty.gif
    empty.gif
    empty.gif
    line.gif
    line.gif
    empty.gif
    line.gif
    line.gif
    joinbottomminus.gif
    actions.gif
    Loop - Actions
    • empty.gif
      empty.gif
      empty.gif
      line.gif
      line.gif
      empty.gif
      line.gif
      line.gif
      empty.gif
      joinbottom.gif
      page.gif
      Do nothing

The reason the unit can walk through trees is because you turn their collision off:
Turn collision for GreaterBashTarget off

But you never turn it on again.
 
Level 14
Joined
Jul 19, 2007
Messages
770
Why are you picking every destructible with the GreaterBashPoint3 and then doing it nothing with them?

Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
  • empty.gif
    empty.gif
    empty.gif
    line.gif
    line.gif
    empty.gif
    line.gif
    line.gif
    joinbottomminus.gif
    actions.gif
    Loop - Actions
    • empty.gif
      empty.gif
      empty.gif
      line.gif
      line.gif
      empty.gif
      line.gif
      line.gif
      empty.gif
      joinbottom.gif
      page.gif
      Do nothing

The reason the unit can walk through trees is because you turn their collision off:
Turn collision for GreaterBashTarget off

But you never turn it on again.
Well I did "Do Nothing" because I don't want it to destroy trees and it doesn't so I'm happy with that... Well I didn't create this spell myself I just imported it to my map and I don't know much about triggerings :-/
 
Level 14
Joined
Jul 19, 2007
Messages
770
The trees will only be destroyed if you tell the trigger to destroy them. Do nothing literally means do nothing. If you had left it blank like this:
  • Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
    • Loop - Actions
You would get the same results.
Ok well it shouldn't really matter then... but what about the bug that makes the units that gets knockedback to be able to walk through destructibles!?
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
As LordDz pointed out the problem is that collision is never turned back on. The place where it is supposed to be turned back on has an error and keeps it turned off. You can see that below. Change the middle line to "Turn collision for GreaterBashTarget[GreaterBashLoop] On":
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GreaterBashCounter[GreaterBashLoop] Greater than or equal to (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
    • Then - Actions
      • Set GreaterBashStop[GreaterBashLoop] = 1
      • Unit - Turn collision for GreaterBashTarget[GreaterBashLoop] Off
      • Set GreaterBashTarget[GreaterBashLoop] = No unit
    • Else - Actions
There is one problem, now that you have removed the destroying of destructibles the unit will be able to be bashed into unwalkable terrain (try bashing someone into a group of trees). When the knockback ends and the unit has its collision turned back on, it will be stuck amid the trees with no way to walk out. That's why the destructibles were destroyed in the first place. If you don't want to destroy destructibles then you'll have to check for the unit colliding with them and simply not move it (or end the knockback) if it would move into some trees.

The simplest solution to this is to keep the "pick every destructible" action and use it to count nearby destructibles. If there are any, simply don't move the unit. As I understand the trigger, the knockback will eventually end itself. You may want to change the detection radius from 150 to a smaller number so you can still knock back units past trees to either side of them. I would do this:
  • Set GreaterBashDestructibleCount = 0
  • Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
    • Loop - Actions
      • Set GreaterBashDestructibleCount = GreaterBashDestructibleCount + 1
  • If (all conditions are true) then do (then actions) else do (else actions)
    • If - Conditions
      • GreaterBashDestructibleCount equal to 0
    • Then - Actions
      • Custom script: call SetUnitX(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationX(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
      • Custom script: call SetUnitY(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationY(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
    • Else - Actions
      • -------- This may or may not be necessary to properly cancel the spell early. Based on my reading of the trigger you don't need it, but the spell may loop forever if the unit is never actually moved to the next point, in which case you will need to add this here: --------
      • Set GreaterBashCounter[GreaterBashLoop] = (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
  • Special Effect - Create a special effect attached to the chest of GreaterBashTarget[GreaterBashLoop] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
  • Special Effect - Destroy (Last created special effect)
  • Custom script: call RemoveLocation (udg_GreaterBashPoint1[udg_GreaterBashLoop])
  • Custom script: call RemoveLocation (udg_GreaterBashPoint2[udg_GreaterBashLoop])
  • Custom script: call RemoveLocation (udg_GreaterBashPoint3[udg_GreaterBashLoop])
  • Else - Actions
 
Level 14
Joined
Jul 19, 2007
Messages
770
As LordDz pointed out the problem is that collision is never turned back on. The place where it is supposed to be turned back on has an error and keeps it turned off. You can see that below. Change the middle line to "Turn collision for GreaterBashTarget[GreaterBashLoop] On":
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GreaterBashCounter[GreaterBashLoop] Greater than or equal to (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
    • Then - Actions
      • Set GreaterBashStop[GreaterBashLoop] = 1
      • Unit - Turn collision for GreaterBashTarget[GreaterBashLoop] Off
      • Set GreaterBashTarget[GreaterBashLoop] = No unit
    • Else - Actions
There is one problem, now that you have removed the destroying of destructibles the unit will be able to be bashed into unwalkable terrain (try bashing someone into a group of trees). When the knockback ends and the unit has its collision turned back on, it will be stuck amid the trees with no way to walk out. That's why the destructibles were destroyed in the first place. If you don't want to destroy destructibles then you'll have to check for the unit colliding with them and simply not move it (or end the knockback) if it would move into some trees.

The simplest solution to this is to keep the "pick every destructible" action and use it to count nearby destructibles. If there are any, simply don't move the unit. As I understand the trigger, the knockback will eventually end itself. You may want to change the detection radius from 150 to a smaller number so you can still knock back units past trees to either side of them. I would do this:
  • Set GreaterBashDestructibleCount = 0
  • Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
    • Loop - Actions
      • Set GreaterBashDestructibleCount = GreaterBashDestructibleCount + 1
  • If (all conditions are true) then do (then actions) else do (else actions)
    • If - Conditions
      • GreaterBashDestructibleCount equal to 0
    • Then - Actions
      • Custom script: call SetUnitX(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationX(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
      • Custom script: call SetUnitY(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationY(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
    • Else - Actions
      • -------- This may or may not be necessary to properly cancel the spell early. Based on my reading of the trigger you don't need it, but the spell may loop forever if the unit is never actually moved to the next point, in which case you will need to add this here: --------
      • Set GreaterBashCounter[GreaterBashLoop] = (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
  • Special Effect - Create a special effect attached to the chest of GreaterBashTarget[GreaterBashLoop] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
  • Special Effect - Destroy (Last created special effect)
  • Custom script: call RemoveLocation (udg_GreaterBashPoint1[udg_GreaterBashLoop])
  • Custom script: call RemoveLocation (udg_GreaterBashPoint2[udg_GreaterBashLoop])
  • Custom script: call RemoveLocation (udg_GreaterBashPoint3[udg_GreaterBashLoop])
  • Else - Actions
Oh... Well if you would like to I can send you the map and you maybe can fix it for me because I'm so lost at triggering :(
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
Oh... Well if you would like to I can send you the map and you maybe can fix it for me because I'm so lost at triggering :(
I literally showed you what you needed to change and where you needed to change it. If you never try anything yourself you will never get any better at triggering or become confident you can do simple edits. Try it.
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
I know but I'm so afraid to do anything wrong and fuck up the triggers even more :-/
And thus man invented the Holy Trinity of keyboard macroes:

Ctrl+Z
Ctrl+C
Ctrl+V

You can copy all or part of the trigger into another one and set it to 'disabled' (right click it and you should see this option, or you can click the check box near the top of the trigger editor window).
 
Level 14
Joined
Jul 19, 2007
Messages
770
And thus man invented the Holy Trinity of keyboard macroes:

Ctrl+Z
Ctrl+C
Ctrl+V

You can copy all or part of the trigger into another one and set it to 'disabled' (right click it and you should see this option, or you can click the check box near the top of the trigger editor window).
Sry but I don't really get it and I don't think I can get it working by myself :-/
 
Level 14
Joined
Jul 19, 2007
Messages
770
What is there not to get? Make a copy of the trigger, disable the original and edit the copy.
It's isn't that easy because I don't know where in the triggers I should replace these... Also I got a trigger that pervents units to be knockedback through destructibles atleast most of them. I got alot of knockback spells in my map and as far as I know there is only one of those spells that still knocksback units through destructibles so they are getting stuck but that spell is made by JASS and I know absolutely nothing about that :-/
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
Let me make an analogy for you to explain why I'm resistant to simply making the trigger for you:

Imagine making a triggered spell is like baking a specific type of cake for your birthday. You know what you want to eat but don't know how to make it yourself, so you ask your neighbors (us on the forum) if they have a recipe. Your neighbors don't have a recipe for that type of cake, so you search around a bit for a recipe someone else has written up that seems similar to what you want to make (the Greater Bash you found). You go back to your neighbors and instead of not helping you again they say "the difference between that recipe and what you want to bake is instead of cinnamon you should use nutmeg, and you're going to need to add an extra egg after step 5."

Instead of trying to bake the cake yourself, you then ask them if they can just make it for you.

Your neighbors are intelligent and know that if they help you out now you won't have learned how to make simple modifications to a recipe and you will definitely come back and ask them to make another one next year when you inevitably have another birthday cake request, so they refuse. But they don't want to be rude, so they reiterate their earlier instructions with more information. "Nutmeg will make the frosting taste wonderful, so you can add a little bit at a time until it tastes just right to you. Here's a video of how to crack an egg: video."

Then they give you some nutmeg and a whole carton of eggs from their pantry.

Instead of going home to try it yourself even one time you beg them to come over to crack the egg for your and add just the right amount of nutmeg, since you're scared you'll mess up the cake and it'll only take them a second because clearly they know what they're doing. You neighbors, realizing you are jumping through hoops to avoid learning anything for yourself, slam the door in your face and ignore your calls forever.


________

I showed you exactly what to add to the code. I showed you where you should add it. I explained why you should add it. I listed alternatives. You have all of the tools necessary to learn this yourself-- and imagine all the cool spells you will be able to modify when you've learned a little bit about triggers!

Yet you have done nothing. And yes, this is an incredible easy fix; my comparison to cracking eggs and adding pinches of nutmeg was chosen intentionally.
 
Level 14
Joined
Jul 19, 2007
Messages
770
Let me make an analogy for you to explain why I'm resistant to simply making the trigger for you:

Imagine making a triggered spell is like baking a specific type of cake for your birthday. You know what you want to eat but don't know how to make it yourself, so you ask your neighbors (us on the forum) if they have a recipe. Your neighbors don't have a recipe for that type of cake, so you search around a bit for a recipe someone else has written up that seems similar to what you want to make (the Greater Bash you found). You go back to your neighbors and instead of not helping you again they say "the difference between that recipe and what you want to bake is instead of cinnamon you should use nutmeg, and you're going to need to add an extra egg after step 5."

Instead of trying to bake the cake yourself, you then ask them if they can just make it for you.

Your neighbors are intelligent and know that if they help you out now you won't have learned how to make simple modifications to a recipe and you will definitely come back and ask them to make another one next year when you inevitably have another birthday cake request, so they refuse. But they don't want to be rude, so they reiterate their earlier instructions with more information. "Nutmeg will make the frosting taste wonderful, so you can add a little bit at a time until it tastes just right to you. Here's a video of how to crack an egg: video."

Then they give you some nutmeg and a whole carton of eggs from their pantry.

Instead of going home to try it yourself even one time you beg them to come over to crack the egg for your and add just the right amount of nutmeg, since you're scared you'll mess up the cake and it'll only take them a second because clearly they know what they're doing. You neighbors, realizing you are jumping through hoops to avoid learning anything for yourself, slam the door in your face and ignore your calls forever.


________

I showed you exactly what to add to the code. I showed you where you should add it. I explained why you should add it. I listed alternatives. You have all of the tools necessary to learn this yourself-- and imagine all the cool spells you will be able to modify when you've learned a little bit about triggers!

Yet you have done nothing. And yes, this is an incredible easy fix; my comparison to cracking eggs and adding pinches of nutmeg was chosen intentionally.
lol that was a very funny explanation... well I'll try once again to do it by myself but I will not be able to do the other spell by myself :-/
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
I don't expect you to be able to make everything for yourself, but I expect that if you try a little bit here and there you'll learn how to make simple changes on your own. If you can show me that you tried to change this and things went horribly wrong, I have no qualms about making the trigger for you. It's the attitude of 'I can't try' that I don't like.

Good luck, and post back here if you're confused!
 
Level 14
Joined
Jul 19, 2007
Messages
770
I don't expect you to be able to make everything for yourself, but I expect that if you try a little bit here and there you'll learn how to make simple changes on your own. If you can show me that you tried to change this and things went horribly wrong, I have no qualms about making the trigger for you. It's the attitude of 'I can't try' that I don't like.

Good luck, and post back here if you're confused!
Alright so now I think I've done exactly like you told me but still the knocked back units is able to walk through all destructibles... Well the unit does not longer getting knockedback through destructibles and that's a good point but still after it is knocked back the unit is able to walk through all destructibles as I told :(

Here is how the trigger looks like now.
  • Maul Knockback Copy
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer GreaterBashLoop) from 1 to GreaterBashCount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GreaterBashStop[GreaterBashLoop] Not equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GreaterBashCounter[GreaterBashLoop] Less than (0.75 + (0.20 x (Real((Level of Wrath of Numenor for GreaterBashCaster[GreaterBashLoop])))))
                • Then - Actions
                  • Set GreaterBashCounter[GreaterBashLoop] = (GreaterBashCounter[GreaterBashLoop] + 0.04)
                  • Set GreaterBashPoint1[GreaterBashLoop] = (Position of GreaterBashCaster[GreaterBashLoop])
                  • Set GreaterBashPoint2[GreaterBashLoop] = (Position of GreaterBashTarget[GreaterBashLoop])
                  • Set GreaterBashPoint3[GreaterBashLoop] = (GreaterBashPoint2[GreaterBashLoop] offset by (15.00 - (GreaterBashCounter[GreaterBashLoop] x 10.00)) towards GreaterBashAngle[GreaterBashLoop] degrees)
                  • Set GreaterBashDestructibleCount = 0
                  • Destructible - Pick every destructible within 150.00 of GreaterBashPoint3[GreaterBashLoop] and do (Actions)
                    • Loop - Actions
                      • Set GreaterBashDestructibleCount = (GreaterBashDestructibleCount + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GreaterBashDestructibleCount Equal to 0
                    • Then - Actions
                      • Custom script: call SetUnitX(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationX(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
                      • Custom script: call SetUnitY(udg_GreaterBashTarget[udg_GreaterBashLoop] , GetLocationY(udg_GreaterBashPoint3[udg_GreaterBashLoop]) )
                    • Else - Actions
                      • Set GreaterBashCounter[GreaterBashLoop] = (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
                  • Special Effect - Create a special effect attached to the chest of GreaterBashTarget[GreaterBashLoop] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation (udg_GreaterBashPoint1[udg_GreaterBashLoop])
                  • Custom script: call RemoveLocation (udg_GreaterBashPoint2[udg_GreaterBashLoop])
                  • Custom script: call RemoveLocation (udg_GreaterBashPoint3[udg_GreaterBashLoop])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GreaterBashCounter[GreaterBashLoop] Greater than or equal to (0.75 + (0.20 x (Real((Level of Maul for GreaterBashCaster[GreaterBashLoop])))))
                    • Then - Actions
                      • Set GreaterBashStop[GreaterBashLoop] = 1
                      • Unit - Turn collision for GreaterBashTarget[GreaterBashLoop] Off
                      • Set GreaterBashTarget[GreaterBashLoop] = No unit
                    • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GreaterBashCooldownStop[GreaterBashLoop] Not equal to 1
            • Then - Actions
              • Set GreaterBashCooldown[GreaterBashLoop] = (GreaterBashCooldown[GreaterBashLoop] + 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GreaterBashCooldown[GreaterBashLoop] Greater than or equal to 1.50
                • Then - Actions
                  • Set GreaterBashCooldownStop[GreaterBashLoop] = 1
                  • Unit Group - Remove GreaterBashCaster[GreaterBashLoop] from GreaterBashCooldownGroup
                  • Set GreaterBashCaster[GreaterBashLoop] = No unit
                • Else - Actions
            • Else - Actions
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
As we said above the collision is not being turned back on. There is an error in these lines. Instead of "off" it should be set to "on".
  • Set GreaterBashStop[GreaterBashLoop] = 1
  • Unit - Turn collision for GreaterBashTarget[GreaterBashLoop] Off
  • Set GreaterBashTarget[GreaterBashLoop] = No unit
 
Level 14
Joined
Jul 19, 2007
Messages
770
As we said above the collision is not being turned back on. There is an error in these lines. Instead of "off" it should be set to "on".
  • Set GreaterBashStop[GreaterBashLoop] = 1
  • Unit - Turn collision for GreaterBashTarget[GreaterBashLoop] Off
  • Set GreaterBashTarget[GreaterBashLoop] = No unit
Oh you are right... I changed it now and it seems to be working like it should so far :) Then I need someone to help me with the other knockback spell that I haven't found a similar spell to in any spellpack.

Savage Blow
A powerful knockback attack that affecting all enemies in front of the Bear. Damages all enemies in front for 100 damage and knocking them back with the distance of 300.

You think that attack will be hard or complicated to make? It's just a 1 lvl attack and none-target you just click it and the Bear should make it's "Bash-animation" and all enemies in front of it should be damaged and knocked back as I said.
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
While that'll be a little more complex I think you should be capable of making the appropriate modifications to copies of your existing triggers. The easiest way would be to simply take the 2 Maul/Greater Bash triggers you have, copy them, change all the variables to new ones of the same type and make some adjustments to the 'end detection' of the movement loop in the periodic trigger. Just go line by line and see what I've removed; I think this should work.

  • Savage Blow Trigger
    • Events
      • Unit - A starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Savage Blow
    • Actions
      • Set TempUnit1 = (Triggering Unit)
      • Set TempPoint1 = (Position of TempUnit1)
      • Set TempReal1 = (Facing angle of TempUnit1)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within RANGE of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit2 = (Picked Unit)
          • Set TempPoint2 = (Position of TempUnit2)
          • Set TempReal2 = (Angle from TempPoint1 to TempPoint2)
          • If (All conditions) then do (actions) else (actions)
            • If - Conditions
              • (TempUnit2 belongs to an enemy of TempUnit1) equal to true
              • ((Cos((TempReal1 - TempReal2)))) Greater than or equal to Cos(ARC_LENGTH/2)
              • -------- Example: if it should hit units in a 30 degree arc, then "greater than or equal to Cos(30.00/2)" or just write "15.00" --------
              • -------- This check looks complicated because angles are cyclical and we need to account for the fact that 359 is really close to 1 but 359-1 wouldn't tell you that --------
            • Then - Actions
              • Set SavageBlowCount = (SavageBlowCount + 1)
              • Set SavageBlowCaster[SavageBlowCount] = TempUnit1
              • Set SavageBlowPoint = TempPoint1
              • Set SavageBlowTarget[SavageBlowCount] = TempUnit2
              • Set SavageBlowAngle[SavageBlowCount] = TempReal2
              • Unit - Turn collision for SavageBlowTarget[SavageBlowCount] Off
              • Unit - Cause SavageBlowCaster[SavageBlowCount] to damage SavageBlowTarget[SavageBlowCount], dealing (100.00) damage of attack type Normal and damage type Normal
              • Unit - Create 1 Dummy for (Owner of SavageBlowCaster[SavageBlowCount]) at SavageBlowPoint facing 270.00 degrees
              • Set SavageBlowDummy[1] = (Last created unit)
              • Unit - Add Savage Blow Stun to SavageBlowDummy[1]
              • Unit - Add a 1.00 second Generic expiration timer to SavageBlowDummy[1]
              • Unit - Order SavageBlowDummy[1] to Neutral - Hurl Boulder SavageBlowTarget[SavageBlowCount]
            • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint1)
  • Savage Blow Knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SavageBlowLoop) from 1 to SavageBlowCount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SavageBlowStop[SavageBlowLoop] Not equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • -------- You'll have to change this so it knocks back the appropriate amount, do some experiments --------
                  • SavageBlowCounter[SavageBlowLoop] Less than (0.75 + (0.20 x (Real((Level of Wrath of Numenor for SavageBlowCaster[SavageBlowLoop])))))
                • Then - Actions
                  • Set SavageBlowCounter[SavageBlowLoop] = (SavageBlowCounter[SavageBlowLoop] + 0.04)
                  • -------- This line doesn't need to exist either, I don't think (and its corresponding leak removal line down below the SFX calls --------
                  • Set SavageBlowPoint1[SavageBlowLoop] = (Position of SavageBlowCaster[SavageBlowLoop])
                  • -------- ^^^^ --------
                  • Set SavageBlowPoint2[SavageBlowLoop] = (Position of SavageBlowTarget[SavageBlowLoop])
                  • Set SavageBlowPoint3[SavageBlowLoop] = (SavageBlowPoint2[SavageBlowLoop] offset by (15.00 - (SavageBlowCounter[SavageBlowLoop] x 10.00)) towards SavageBlowAngle[SavageBlowLoop] degrees)
                  • Set SavageBlowDestructibleCount = 0
                  • Destructible - Pick every destructible within 150.00 of SavageBlowPoint3[SavageBlowLoop] and do (Actions)
                    • Loop - Actions
                      • Set SavageBlowDestructibleCount = (SavageBlowDestructibleCount + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SavageBlowDestructibleCount Equal to 0
                    • Then - Actions
                      • Custom script: call SetUnitX(udg_SavageBlowTarget[udg_SavageBlowLoop] , GetLocationX(udg_SavageBlowPoint3[udg_SavageBlowLoop]) )
                      • Custom script: call SetUnitY(udg_SavageBlowTarget[udg_SavageBlowLoop] , GetLocationY(udg_SavageBlowPoint3[udg_SavageBlowLoop]) )
                    • Else - Actions
                      • -------- Don't forget to change this line to match up with whatever new check you set above --------
                      • Set SavageBlowCounter[SavageBlowLoop] = (0.75 + (0.20 x (Real((Level of Maul for SavageBlowCaster[SavageBlowLoop])))))
                  • Special Effect - Create a special effect attached to the chest of SavageBlowTarget[SavageBlowLoop] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation (udg_SavageBlowPoint1[udg_SavageBlowLoop])
                  • Custom script: call RemoveLocation (udg_SavageBlowPoint2[udg_SavageBlowLoop])
                  • Custom script: call RemoveLocation (udg_SavageBlowPoint3[udg_SavageBlowLoop])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • -------- --------
                      • -------- you don't actually need this second check, so you should remove it. Also in your Maul trigger.
                      • -------- But keep the actions! --------
                      • -------- --------
                      • SavageBlowCounter[SavageBlowLoop] Greater than or equal to (0.75 + (0.20 x (Real((Level of Maul for SavageBlowCaster[SavageBlowLoop])))))
                    • Then - Actions
                      • Set SavageBlowStop[SavageBlowLoop] = 1
                      • Unit - Turn collision for SavageBlowTarget[SavageBlowLoop] On
                      • Set SavageBlowTarget[SavageBlowLoop] = No unit
                    • Else - Actions
            • Else - Actions
          • -------- --------
          • -------- All of this is not necessary since there's no internal bash cooldown you need to worry about --------
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SavageBlowCooldownStop[SavageBlowLoop] Not equal to 1
            • Then - Actions
              • Set SavageBlowCooldown[SavageBlowLoop] = (SavageBlowCooldown[SavageBlowLoop] + 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SavageBlowCooldown[SavageBlowLoop] Greater than or equal to 1.50
                • Then - Actions
                  • Set SavageBlowCooldownStop[SavageBlowLoop] = 1
                  • Unit Group - Remove SavageBlowCaster[SavageBlowLoop] from SavageBlowCooldownGroup
                  • Set SavageBlowCaster[SavageBlowLoop] = No unit
                • Else - Actions
            • Else - Actions
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
4,990
Hmm wouldn't Acos and Cos just cancel each other out since they are inverse functions?
Yes, Acos(Cos(X)) = X + N*2*PI where N is some (positive or negative) integer. The reason you would do that here is because angles are cyclical but Angle1-Angle2 might give you something outside the range of 2*PI and doing that effectively converts the angle into something in the range 0 < X < 2*PI.
 
Level 11
Joined
May 16, 2016
Messages
730
Alright I need someone to make 2 knockback spells to me for my map and they are meant to be for a single unit which is Druid of the Claw in Bear Form so there will only be 1 level for each spell. I need the knockback spell of the Spirit Breaker in Dota that works exactly the same and secondly I need a knockback spell that works like the Bear attacks all enemies infront of him when casted and damaging them and knocking them back a short distance. I hope I've explained well enough, please someone!?
Here is an example for FRONTAL KNOCKBACK, it could help you.
 

Attachments

  • Knockback example by fruit forest..w3x
    16 KB · Views: 53
Level 14
Joined
Jul 19, 2007
Messages
770
While that'll be a little more complex I think you should be capable of making the appropriate modifications to copies of your existing triggers. The easiest way would be to simply take the 2 Maul/Greater Bash triggers you have, copy them, change all the variables to new ones of the same type and make some adjustments to the 'end detection' of the movement loop in the periodic trigger. Just go line by line and see what I've removed; I think this should work.

  • Savage Blow Trigger
    • Events
      • Unit - A starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Savage Blow
    • Actions
      • Set TempUnit1 = (Triggering Unit)
      • Set TempPoint1 = (Position of TempUnit1)
      • Set TempReal1 = (Facing angle of TempUnit1)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within RANGE of TempPoint) and do (Actions)
        • Loop - Actions
          • Set TempUnit2 = (Picked Unit)
          • Set TempPoint2 = (Position of TempUnit2)
          • Set TempReal2 = (Angle from TempPoint1 to TempPoint2)
          • If (All conditions) then do (actions) else (actions)
            • If - Conditions
              • (TempUnit2 belongs to an enemy of TempUnit1) equal to true
              • ((Cos((TempReal1 - TempReal2)))) Greater than or equal to Cos(ARC_LENGTH/2)
              • -------- Example: if it should hit units in a 30 degree arc, then "greater than or equal to Cos(30.00/2)" or just write "15.00" --------
              • -------- This check looks complicated because angles are cyclical and we need to account for the fact that 359 is really close to 1 but 359-1 wouldn't tell you that --------
            • Then - Actions
              • Set SavageBlowCount = (SavageBlowCount + 1)
              • Set SavageBlowCaster[SavageBlowCount] = TempUnit1
              • Set SavageBlowPoint = TempPoint1
              • Set SavageBlowTarget[SavageBlowCount] = TempUnit2
              • Set SavageBlowAngle[SavageBlowCount] = TempReal2
              • Unit - Turn collision for SavageBlowTarget[SavageBlowCount] Off
              • Unit - Cause SavageBlowCaster[SavageBlowCount] to damage SavageBlowTarget[SavageBlowCount], dealing (100.00) damage of attack type Normal and damage type Normal
              • Unit - Create 1 Dummy for (Owner of SavageBlowCaster[SavageBlowCount]) at SavageBlowPoint facing 270.00 degrees
              • Set SavageBlowDummy[1] = (Last created unit)
              • Unit - Add Savage Blow Stun to SavageBlowDummy[1]
              • Unit - Add a 1.00 second Generic expiration timer to SavageBlowDummy[1]
              • Unit - Order SavageBlowDummy[1] to Neutral - Hurl Boulder SavageBlowTarget[SavageBlowCount]
            • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint1)
  • Savage Blow Knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SavageBlowLoop) from 1 to SavageBlowCount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SavageBlowStop[SavageBlowLoop] Not equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • -------- You'll have to change this so it knocks back the appropriate amount, do some experiments --------
                  • SavageBlowCounter[SavageBlowLoop] Less than (0.75 + (0.20 x (Real((Level of Wrath of Numenor for SavageBlowCaster[SavageBlowLoop])))))
                • Then - Actions
                  • Set SavageBlowCounter[SavageBlowLoop] = (SavageBlowCounter[SavageBlowLoop] + 0.04)
                  • -------- This line doesn't need to exist either, I don't think (and its corresponding leak removal line down below the SFX calls --------
                  • Set SavageBlowPoint1[SavageBlowLoop] = (Position of SavageBlowCaster[SavageBlowLoop])
                  • -------- ^^^^ --------
                  • Set SavageBlowPoint2[SavageBlowLoop] = (Position of SavageBlowTarget[SavageBlowLoop])
                  • Set SavageBlowPoint3[SavageBlowLoop] = (SavageBlowPoint2[SavageBlowLoop] offset by (15.00 - (SavageBlowCounter[SavageBlowLoop] x 10.00)) towards SavageBlowAngle[SavageBlowLoop] degrees)
                  • Set SavageBlowDestructibleCount = 0
                  • Destructible - Pick every destructible within 150.00 of SavageBlowPoint3[SavageBlowLoop] and do (Actions)
                    • Loop - Actions
                      • Set SavageBlowDestructibleCount = (SavageBlowDestructibleCount + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SavageBlowDestructibleCount Equal to 0
                    • Then - Actions
                      • Custom script: call SetUnitX(udg_SavageBlowTarget[udg_SavageBlowLoop] , GetLocationX(udg_SavageBlowPoint3[udg_SavageBlowLoop]) )
                      • Custom script: call SetUnitY(udg_SavageBlowTarget[udg_SavageBlowLoop] , GetLocationY(udg_SavageBlowPoint3[udg_SavageBlowLoop]) )
                    • Else - Actions
                      • -------- Don't forget to change this line to match up with whatever new check you set above --------
                      • Set SavageBlowCounter[SavageBlowLoop] = (0.75 + (0.20 x (Real((Level of Maul for SavageBlowCaster[SavageBlowLoop])))))
                  • Special Effect - Create a special effect attached to the chest of SavageBlowTarget[SavageBlowLoop] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation (udg_SavageBlowPoint1[udg_SavageBlowLoop])
                  • Custom script: call RemoveLocation (udg_SavageBlowPoint2[udg_SavageBlowLoop])
                  • Custom script: call RemoveLocation (udg_SavageBlowPoint3[udg_SavageBlowLoop])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • -------- --------
                      • -------- you don't actually need this second check, so you should remove it. Also in your Maul trigger.
                      • -------- But keep the actions! --------
                      • -------- --------
                      • SavageBlowCounter[SavageBlowLoop] Greater than or equal to (0.75 + (0.20 x (Real((Level of Maul for SavageBlowCaster[SavageBlowLoop])))))
                    • Then - Actions
                      • Set SavageBlowStop[SavageBlowLoop] = 1
                      • Unit - Turn collision for SavageBlowTarget[SavageBlowLoop] On
                      • Set SavageBlowTarget[SavageBlowLoop] = No unit
                    • Else - Actions
            • Else - Actions
          • -------- --------
          • -------- All of this is not necessary since there's no internal bash cooldown you need to worry about --------
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SavageBlowCooldownStop[SavageBlowLoop] Not equal to 1
            • Then - Actions
              • Set SavageBlowCooldown[SavageBlowLoop] = (SavageBlowCooldown[SavageBlowLoop] + 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SavageBlowCooldown[SavageBlowLoop] Greater than or equal to 1.50
                • Then - Actions
                  • Set SavageBlowCooldownStop[SavageBlowLoop] = 1
                  • Unit Group - Remove SavageBlowCaster[SavageBlowLoop] from SavageBlowCooldownGroup
                  • Set SavageBlowCaster[SavageBlowLoop] = No unit
                • Else - Actions
            • Else - Actions
Oh that doesn't look that simple to me... I would like you to make it on a spellpack map so I can just copy and paste them into my map or make it on my map I want that spell in... Atleast I made the "Maul" spell working by myself but I'm still not sure it's correct :-/
 
Level 14
Joined
Jul 19, 2007
Messages
770
Alright I was giving it a try and made exactly like you did but I couldn't add this
  • ((Cos((TempReal1 - TempReal2)))) Greater than or equal to Cos(ARC_LENGTH/2)
How do I do it? Anyway I tested the spell and it seems to be working pretty good but there is still problems... It seems to be knocking back all enemy units around it :-/ Btw I also noticed both this spell "Savage Blow" and "Maul" seems to be knocking back wards too :-/ I want both these spells to only work against organic units...
 
Level 14
Joined
Jul 19, 2007
Messages
770
You can add a check for non-ward units in the conditions of the trigger for Maul and in the same if block as the Cos thing for Savage Blow. To get that line:

>>Real Comparison
>>Math - Cosine
Can you please make it more clear? And is the
  • ((Cos((TempReal1 - TempReal2)))) Greater than or equal to Cos(ARC_LENGTH/2)
important? Savage Blow also seems to be knocking back cropses of already dead units... It's really bad in world editor you can't simply check is the unit-types are ward, invulnerable and more, it sucks...
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
There are a few classification checks but I was wrong that there is one for "ward". You have two options: use one of the default classifications like Sapper (AKA Suicidal) to mean "ward" in your map, or give every ward a dummy passive ability that identifies it as a ward. In the first case you'll have to add the classification to all ward-type units via the Object Editor. In the second case you'll need to create a new passive ability that does nothing and then add that ability to all ward units on your map.

  • If - Conditions
    • (TempUnit2 belongs to an enemy of TempUnit1) equal to true
    • (TempUnit2 is alive) equal to true
    • -------- Put other checks here like the above --------
    • (TempUnit2 is a Sapper) equal to true
    • (Level of WARD_IDENTIFICATION_ABILITY for TempUnit2) equal to 0
    • -------- There is no "ward" classification check so either of the two above lines is your best option for checking if its a ward --------
    • ((Cos((TempReal1 - TempReal2)))) Greater than or equal to Cos(ARC_LENGTH/2)
  • Maul Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Maul for (Attacking unit)) Greater than 0
      • ((Attacking unit) is in GreaterBashCooldownGroup) Not equal to True
      • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
      • ((Attacked unit) is A structure) Not equal to True
      • -------- You can add similar checks here to disallow knocking back other types of units --------
    • Actions
I literally couldn't be more clear about the Cos() thing. First pick "Real comparison", then choose "Math - Cosine" for the left side, then "Math - Arithmetic" so you can write TempReal1-TempReal2. Similar for the right side.
 
Level 14
Joined
Jul 19, 2007
Messages
770
There are a few classification checks but I was wrong that there is one for "ward". You have two options: use one of the default classifications like Sapper (AKA Suicidal) to mean "ward" in your map, or give every ward a dummy passive ability that identifies it as a ward. In the first case you'll have to add the classification to all ward-type units via the Object Editor. In the second case you'll need to create a new passive ability that does nothing and then add that ability to all ward units on your map.

  • If - Conditions
    • (TempUnit2 belongs to an enemy of TempUnit1) equal to true
    • (TempUnit2 is alive) equal to true
    • -------- Put other checks here like the above --------
    • (TempUnit2 is a Sapper) equal to true
    • (Level of WARD_IDENTIFICATION_ABILITY for TempUnit2) equal to 0
    • -------- There is no "ward" classification check so either of the two above lines is your best option for checking if its a ward --------
    • ((Cos((TempReal1 - TempReal2)))) Greater than or equal to Cos(ARC_LENGTH/2)
  • Maul Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Maul for (Attacking unit)) Greater than 0
      • ((Attacking unit) is in GreaterBashCooldownGroup) Not equal to True
      • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
      • ((Attacked unit) is A structure) Not equal to True
      • -------- You can add similar checks here to disallow knocking back other types of units --------
    • Actions
I literally couldn't be more clear about the Cos() thing. First pick "Real comparison", then choose "Math - Cosine" for the left side, then "Math - Arithmetic" so you can write TempReal1-TempReal2. Similar for the right side.
Hmm ok but what means with (ARC_LENGTH/2) ??
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
http://www.ck12.org/flx/show/cover ...1424996257701994-201502261424999414583037.png
Literally how many degrees of arc you want to knockback units in divided by 2. X in the above picture. If you want to hit everything 'in front' of the unit, ARC_LENGTH = 180. If you want only a smaller cone, maybe ARC_LENGTH of 120 or 90 degrees is appropriate.

Then divide by 2, so it would be: 180/2=90, 120/2=60, 90/2=45 for my 3 examples.
 
Level 39
Joined
Feb 27, 2007
Messages
4,990
Glad to hear! (See how much familiarity with the Trigger/Object Editors you've gained by doing it yourself?) I suggest using the Suicidal/Sapper tag as it'll probably be easiest, but just be aware that anything else classified that way won't get knocked back either.
 
Level 14
Joined
Jul 19, 2007
Messages
770
Glad to hear! (See how much familiarity with the Trigger/Object Editors you've gained by doing it yourself?) I suggest using the Suicidal/Sapper tag as it'll probably be easiest, but just be aware that anything else classified that way won't get knocked back either.
Hmm well actually I have all wards classified as structures too so maybe I can just add a check in the Savage Blow trigger itself to only damage and knockback organtic units??
 
Status
Not open for further replies.
Top