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

Knock-back AoE V2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Spell is a simple Knock-Back spell made into an AoE.

-Leak Proof

-Yes I know its listed as GUI, but it does use wait that is MUI.

-Screen Capturing on Wc3 wasn't quick enough to capture the units. So it looks a lot better in game than in the Screen shot.

Editables

-To change the damage just go to the spell, and change damage from 25 to <, or >

-To change distance of the Knock-Back go to Knock-Back 2, and change the Periodic Event from 0.04 to Whatever. (Lower means farther, higher means Shorter.)

-To change what the trail is they leave (Like if you want to have it in most games where it looks like there grinding through dirt.) then just go to Knock-Back 2, and change the special effect to whatever you want.

-If you don't want the units to be deleted if they reach the far edge you have 2 options.

1. Go to Knock-Back 1, and Take away the Collision triggers. If you don't mind units stopping (Or Want) at trees, and going around, and stuff. Up to you.

2. If you don't want to create regions on the edges (Unplayable Area.) (If you don't have one then Make a thin strip along the border.) Rename them to what you want. Then create a trigger that makes it so that if anyone enters these they are teleported to some place (Create a region that you want them to be teleported to.). Turn it initially off. Then go into Knock-back 1, and add the trigger right before wait (Turn on ("Name of Trigger you created"). Then add after Wait (Turn off ("Name of Trigger you created").


You do not have to give me credit for this spell.

Updated to resolve a few bugs.

Keywords:
Knockback AoE, GUI, MUI, Knock-Back AoE, Aoe
Contents

Knockback (GUI) (Map)

Reviews
20:05, 22nd Jun 2010 TriggerHappy: Not MUI and very poor examples. We have far better knockback examples in the database already, so I'm going to reject this permanently.

Moderator

M

Moderator

20:05, 22nd Jun 2010
TriggerHappy:

Not MUI and very poor examples. We have far better knockback examples in the database already, so I'm going to reject this permanently.
 
Right Imma put this simply:
-Not Mui, (there is no arraying or use of hashtables)
-Not levelled (not needed really, but it's always good)
-Uses TSF (Trigger sleep functions, better known as waits)
-Doesn't destroy Sfx, leaving them there eventually making the game laggy
-Another main point on the mui issue - if It's turned off 1 second after casting, what if theres another caster? it'll stop early.
-Every 0.03 seconds is preferable to 0.04 - Thats just how it is - don't ask me =P
 
Level 3
Joined
May 5, 2010
Messages
20
Ok thank you, but I was told that wait is MUI, not GUI. I'll fix the SFX now. The 0.04 is to whatever you want, that's why it was listed under Editables read the whole thing. On the One Second caster thing I'll try to find a way around it, but really one second... I don't think it'll cause that much errors. After I fix it up it shouldn't cause to many errors.
 
Level 3
Joined
May 5, 2010
Messages
20
Ok Thank You. I was thinking about replacing the wait with either these two options.

Turn on Trigger (Trigger 3)

Trigger 3 -

Every 0.2 seconds.

Set variable Integer to Integer + 1.

Trigger 4 -

Every 0.01 seconds.

Integer = 5.

Turn off Trigger 2
Turn off Trigger 3
Set Integer = 0


Or.

Create a timer, and have the timer run for a second, when the timer ends turn off Trigger 2, and 3.

P.S But that still doesn't resolve the double caster thing.
 
Last edited by a moderator:
Level 3
Joined
May 5, 2010
Messages
20
Ok that's similar and its even better put.

I also found a way around the double caster. If there is a .5 second casting time. Then there would only be the possibility for another caster to cast it at the .51 second mark of the trigger. If that where to happen then by the time theirs is cast then it would automatically be 0.01 seconds after the cast setting it to be redone causing no errors. If two people do it at exactly the same time then they would both go the same distance, but I was thinking about putting it at .75 casting time because if someone casts it during the 0.01 to the 0.50 second then it would start casting before it is reset.

I also found another bug. If someone cast it while near an ally it would also push the ally away to. So I'll have to put the trigger in pick every unit in ownership of player 1 red, and remove them from Units. I would do it for all players, and then have it in description where you have to remove the ones that are of the enemy, but if it was also used by some other unit then that wouldn't work. So either it has to be a tk spell, or there would have to be about 12 (or <) triggers to do this spell.

Okay updated it for the newest one check it out, and see what else you think should be resolved.

P.S The double-caster bug has been fixed, but if you think it should be 1 second instead of 0.75 maybe it should be, because then there wouldn't be the change of two people casting it at once, even tho the odds are slim.
 
Last edited by a moderator:
only remove units under the ownership of (owner of unit (Triggering unit)) Rather than a set player, also the way around the mui problem is via arraying your variables or using hashtables so that it won't matter who casts itr at what time and what not. also no matter how 'perfectly' you time the casting - in the currant trigger setup theres always a way to make it bug.

on a sidenote: Use the [Edit] Button rather than double posting - it's in the rules.
 
Level 7
Joined
Apr 1, 2010
Messages
289
Hitsugaya, you could easily stop sending the units off the edge of the map by

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Terrain pathing at Knockback_To of type Walkability is off) Equal to False
    • Then - Actions
      • Special Effect - Create a special effect at Position_of_Unit using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Move (Picked unit) instantly to Knockback_To
    • Else - Actions
if you did this, it would prevent the unit from being thrown off the edge of the map
 
Level 14
Joined
Nov 18, 2007
Messages
816
Making GUI "code" using Waits MUI is one of those things youre better off not trying. Its possible, of course, and involves a fucktonne of direct hashtable usage.
Really, youre better off not trying this, and instead moving to vJass (which is not nearly as complicated as the proponents of GUI want you to believe).
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
Hitsu, you should stop being a donkey, you are a really heavy beginner without an idea about GUI coding, you shouldn't tell other people how they should do it.... first learn how things really are.... then you can talk.

And if you look at my resources now, trying to tell me that I am a noob... 90% of my spells are rated by mods with a 4.00 or 5.00... so forget it, i am like 7 years longer in this buisness as you.
 
Level 3
Joined
May 5, 2010
Messages
20
You are annoying Redscores... Why the hell do you think me and Tank are talking about it. I am already fixing it I don't have much time on my hands. I never said I was so great at GUI, and I never said "Oh where doing it my way" no we where agreeing on things that would be better.

Thank you for the comments EMo2LoVe, and Deaod.

Narogog I like that idea its a little simpler than putting in the other trigger.

P.S Don't call me "Hitsu"... Its Hitsugaya Daijo, and sorry for not being able to get the code text in right now I only had a second.
 
Top