• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need Help Making Thunder Clap Push-back Effect

Status
Not open for further replies.
Level 4
Joined
Aug 9, 2012
Messages
84
UPDATE: Here is how it works:

Since my map is a rainy map, I used the 'Crushing Wave' Special Effect, so when units are pushed back, their feet sliding against the water, it looks more realistic. You may switch this Special Effect out for a 'Dust-like' Special Effect, or whatever else you think is more fitting for your map.

The Configuration:
  • Thunder Slam Config
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Slam
    • Actions
      • Environment - Stop all active terrain deformations instantly
      • Set tempUnit = (Triggering unit)
      • Set Abil = (Ability being cast)
      • Set AbilLvl = (Level of Abil for tempUnit)
      • Set PushDist = 200.00
      • Set tempPoint = (Position of tempUnit)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 315.00 of tempPoint) and do (Actions)
        • Loop - Actions
          • Set tempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (tempUnit is A structure) Equal to False
              • (tempUnit is alive) Equal to True
              • (tempUnit belongs to an enemy of (Triggering player)) Equal to True
            • Then - Actions
              • Set tempPoint2 = (Position of tempUnit)
              • Set PushAngle = (Angle from tempPoint to tempPoint2)
              • Custom script: set udg_Handle2 = GetHandleId(udg_tempUnit)
              • Custom script: call SaveReal(udg_Hash, udg_Handle2, 0, udg_PushDist)
              • Custom script: call SaveReal(udg_Hash, udg_Handle2, 1, udg_PushAngle)
              • Unit Group - Add (Picked unit) to PushedUnits
              • Custom script: call RemoveLocation(udg_tempPoint2)
            • Else - Actions
      • Trigger - Turn on Thunder Slam Pushback <gen>
      • Custom script: call RemoveLocation(udg_tempPoint)
The Loop (make sure to un-check Initially ON for this trigger)
  • Thunder Slam Pushback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in PushedUnits) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in PushedUnits and do (Actions)
            • Loop - Actions
              • Set tempUnit = (Picked unit)
              • Set tempPoint = (Position of tempUnit)
              • Custom script: set udg_Handle2 = GetHandleId(udg_tempUnit)
              • Custom script: set udg_PushDist = LoadReal(udg_Hash, udg_Handle2, 0)
              • Custom script: set udg_PushAngle = LoadReal(udg_Hash, udg_Handle2, 1)
              • Set tempPoint2 = (tempPoint offset by 5.00 towards PushAngle degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PushDist Greater than 0.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 2) Equal to 1
                    • Then - Actions
                      • Special Effect - Create a special effect at tempPoint2 using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Unit - Move tempUnit instantly to tempPoint2
                  • Custom script: call SaveReal(udg_Hash, udg_Handle2, 0, udg_PushDist-5)
                • Else - Actions
                  • Unit Group - Remove tempUnit from PushedUnits
                  • Custom script: call SaveReal(udg_Hash, udg_Handle2, 0, 0)
                  • Custom script: call SaveReal(udg_Hash, udg_Handle2, 1, 0)
              • Custom script: call RemoveLocation(udg_tempPoint)
              • Custom script: call RemoveLocation(udg_tempPoint2)
        • Else - Actions
          • Trigger - Turn off (This trigger)
============================================

There is a spell in my game called 'Thunder Slam' and I cannot get it to push back all units surrounding the unit casting my 'Thunder Slam' spell.

I read a couple guides on this kind of thing for GUI, but the guy said there was a lag issue (not a leak issue,) because the skill relied on Event - Game Time - Every X Seconds of Game Time, then IF and Actions, which I want to avoid. The guy then said vJASS is required so it wouldn't do this, and I have not an inkling of knowledge in it.

All I have is this, and even in the first action line, I was told by someone in Hive's Chat that it leaks (or lags, I cannot remember which one.) However, it's not to my knowledge why. I didn't get his explanation(s).

  • Thunder Slam
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Slam
    • Actions
      • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 315.00 at (Position of (Casting unit)), dealing 0.00 damage of attack type Normal and damage type Normal
      • Environment - Stop all active terrain deformations instantly
So yeah, basically during testing this you'd have 4 units, let's say, perfectly surrounding the unit using this spell, and each one of them are perfectly pushed back. Having just a regular stun/slow spell that shows no indication of impact on units is boring.

P.S. In one big failing attempt I did something to my trigger and it made all the units go to the center of the map, even though nothing in my action lines told them to. I have since erased all of what was in that code of fail-whaleness. It was weird.
 
Last edited:
Level 4
Joined
Aug 9, 2012
Messages
84
Either way, even if I did get the code right in GUI, it'd still lag. You cannot achieve what I'm trying to achieve via for something like this to work flawlessly with no lags. Leaks are fixable. vJASS is what makes something like this not lag opposed to GUI.

When I read that, it kind of discouraged me to go furthermore with trying to figure it out in GUI, but I don't think I would have anyway.
 
Level 4
Joined
Aug 9, 2012
Messages
84
Well, seeings as my game has 10 max players in it, fighting multiple at once, yeah, it could lag, and I don't even want the chance that it could or would lag. It's bad. This especially applies for my FFA Mode where everyone's fighting at once, or even my TEAMS Mode 5v5.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
JASS and vJASS just optimize codes, but isnt' really that "miraculous". GUI isn't perfect, but if something lags in GUI, it will probably lag in JASS and vJASS unless you find another way to doit (either in GUI, JASS or vJASS?).

Use either Hashtable or Unit Indexer and a UnitGroup to move units further away from the ability caster. Also, Damage Circular Area is bugged, so it's better if you damage each unit in the area independently.

Want me to do it for you?

Also, check in my signature: Waht's a Leak: http://oi50.tinypic.com/dg0115.jpg
 
Level 4
Joined
Aug 9, 2012
Messages
84
But not as much, and if any lag, very unnoticeable. In GUI I'm quite sure the lag is more noticeable.
 
Level 4
Joined
Aug 9, 2012
Messages
84
I have no choice than to get someone to do it . . . Coding is not my strength. My strengths are terraining of any kind, icon making, spell designing, anything to do with sound in the Sound Editor (I can do just about anything with sounds,) directing via plotting / am an ideas man, in-depth proofreading, detailed tooltips, and have just enough very basic code knowledge to get an idea across, but nothing much more than that in mapping.

P.S. I don't even understand the method behind my own retardedness regarding the damaging units in a circle when the spell is based off Thunder Clap anyway dealing damage in a circle. I forget or why for what reason I put that.

As far as the 'Environment - Stop all active terrain deformations instantly' goes, I heard that the spell Thunder Clap causes this and was told to remove them some time ago. I don't know if that advice is flawed or not.

Anyway, yes, it would be appreciated.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
If you want I can do it for you as a tutorial, in GUI and in JASS

Tell me how you want it... How many levels has the ability, the AoE, the slow %, if you want to trigger damage or deal it via Object Editor (OE), etc...
 
Level 4
Joined
Aug 9, 2012
Messages
84
A tutorial would be a waste of time. I can not only be very forgetful, even in reading something I read just a minute ago, but I don't grasp the more advanced modes of GUI, and vJASS? that's an enemy I can never conquer or understand.

Because I don't want everyone having my map file here publicly (especially unfinished and unprotected,) wouldn't it be easier to send my map and work on the spell? The spell is already in the Object Editor and all its info. You can't miss it.

Let me know.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I don't like working with PM's. Don't post the map, just tell me the values you want. I'm already doing the ability, making me search in your map for the data is... mean.
 
I don't like working with PM's. Don't post the map, just tell me the values you want. I'm already doing the ability, making me search in your map for the data is... mean.

lol i like this haha.

@Siryan
The only ppl that cant do something are the ppl that say they cant.
When ppl strive for the best thats when they can become the best or close to it. Saying u cant is pointless. U cant do it not because u cant but because u dont want to.
 
Level 4
Joined
Aug 9, 2012
Messages
84
Not true. I figured it would be convenient because the info of the spell, etc. is already there and I was quite specific in the PM (because I am organized) on where the Spell trigger was at.

To me in the past, when someone's asked me to help them on things I KNOW and are my strengths, I found working in their map to be easier because things were already outlined.

And I've been mapping for 5 yrs and HAVE consulted guides and the people in the Chat of Hive. Ask anyone there especially. They'll tell you. In my map file I have over 8K saves to prove it, each save in between having time put in during editing. So you're wrong, it's not that I don't want to do anything, it's that I cannot grasp it, the math/arithmetic of certain things in coding, etc. It's confusing.

So please, I would appreciate you not being an assumptionist to assume what you do not know. You can look at a man and think you know the man, but if you haven't been within their circle to really know the man, then you don't know the man.

Working outside or IN someone's map is a matter of personal preference.

Again, I have tried to understanding coding but I don't. This is why in real game producing everyone's got their own position they work in, not only because it gets the game released faster, but because it makes more sense. I've basically been a one-man guy in the making of my map with little help until recently. When you have hardly anyone working with you, maps will take 5 yrs like mine has thus far to get released.
 
Not true. I figured it would be convenient because the info of the spell, etc. is already there and I was quite specific in the PM (because I am organized) on where the Spell trigger was at.

To me in the past, when someone's asked me to help them on things I KNOW and are my strengths, I found working in their map to be easier because things were already outlined.

And I've been mapping for 5 yrs and HAVE consulted guides and the people in the Chat of Hive. Ask anyone there especially. They'll tell you. In my map file I have over 8K saves to prove it, each save in between having time put in during editing. So you're wrong, it's not that I don't want to do anything, it's that I cannot grasp it, the math/arithmetic of certain things in coding, etc. It's confusing.

So please, I would appreciate you not being an assumptionist to assume what you do not know. You can look at a man and think you know the man, but if you haven't been within their circle to really know the man, then you don't know the man.

Working outside or IN someone's map is a matter of personal preference.

Again, I have tried to understanding coding but I don't. This is why in real game producing everyone's got their own position they work in, not only because it gets the game released faster, but because it makes more sense. I've basically been a one-man guy in the making of my map with little help until recently. When you have hardly anyone working with you, maps will take 5 yrs like mine has thus far to get released.

ok thats understandable then. from ur join date i was assuming that u didnt even try. so yes that was wrong of me. u shouldnt worry about having everything in jass / vJass tho. just make the stuff in GUI.
 
Level 4
Joined
Aug 9, 2012
Messages
84
I'm sorry I sounded crude, but in these kinds of situations I have to take a stand.

Yeah, I have only just recently heard about this site.

And I know I shouldn't worry about that so much, however, understand that this map is 5 yrs in the making, and if I can get people to help me to make it as smooth-riding as possible then I will seek for this kind of help. If not, that's fine.
 
Level 4
Joined
Aug 9, 2012
Messages
84
You call it mean and I call it convenience when I merely outlined two steps on where to go to edit the spell via in the Triggers Editor and Object Editor, as the information is already set the way I want it.

But if you like it more difficult:

First and foremost, I want the spell so that --- let's say there's 4-5 enemy units circle around the enemy --- they're pushed back some, making the stun and slow affects more interesting.

1. Base the spell off Thunder Clap. Name it Thunder Slam.
2. Set the Effect Sound to HeavyMetalBashStone (can be done in Object Editor, no triggers)
3. The spell has 3 Levels
4. The unit speed reduction should be set to 0.15 / 0.20 / 0.25 in that order for all three levels
5. The AoE damage should be set to 15.00 / 20.00 / 25.00 in that order for all three levels
6. Area of Effect: 315 on all three levels
7. Mana cost to be set to 0 on all three levels
8. Cooldown 8 on all 3 levels
9. Duration - Hero 5 / 6 / 7 on all three levels in that order
10. Duration - Normal 5 / 6 / 7 on all three levels in that order
11. Race: Other
12. 2 / 2 Normal button positions --- 0 / 0 Research button positions
13. Learn Hotkey: Q / Normal Hotkey: Q
14. Ground / Enemy / Neutral / Vulnerable for Targets Allowed

The custom icon and tooltips I'll have to redo if you're going to do it this way.

You wanted all the specifications so here you go. That way, when I CnP the info it will be set the way I have mine in the Object Editor.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
It would have been easier to say "Just mind about the moving part with triggers, and i'll do the rest in the OE with the Ability" xD Anyway, i've been a while working on it but I'm having a small problem :p 'm trying to solve it to post the triggers
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'm used to work with hashtables. Anyway, I never pretender to make the ability exactly as Siryan wanted, just do the triggering part, he can do the rest. I did it in GUI and it doesn't lag at all. If you want me to improve it with JASS then I will but another day. I have been like 18 months without even coming by Hive, neiuther triggering, so I'm slower than I used to be :p

It isn't really polished. The Create/destroy effect can be done in a single line. The group handles are faster on JASS, some constant variables should be declared on map initialization while some others (locals) should be declared as locals in the main config and push triggers, unit collision should be turned off, and there should be a path check to prevent units going behind trees or water, or cliffs, also the Hashtable should be cleaned after this... or should be replaced with Unit Indexer, also the push speed should decrease slowly to make the acceleration effect... I mean, there are some details, but this has no leaks and does what Siryan wants.

I can do it "perfectly" but with more time to get the hang of the trigger editor again :p (With JASS and Hashtable)
 

Attachments

  • Test.w3x
    20 KB · Views: 28
Level 4
Joined
Aug 9, 2012
Messages
84
To make the test map even better, set the health of the test units to a maximum amount while working on this.
 
Last edited:
Level 4
Joined
Aug 9, 2012
Messages
84
It isn't really polished. The Create / Destroy Effect can be done in a single line. The group handles are faster on JASS and some constant variables should be declared on Map Initialization while others (locals) should be declared as locals in the main configuration and push triggers. Unit collision should be turned off, and there should be a path check to prevent units going behind trees, water or cliffs. The Hashtable should be cleaned after this or replaced with Unit Indexer. The push speed should decrease slowly to make the acceleration effect. I mean, these are just some details, but this has no leaks and does what Siryan wants.

I can do it ‘perfectly’ but with more time to get the hang of the trigger editor again :p (With JASS and Hashtable)

Improve / perfect it is the only thing I need done. Be sure to put whatever variables that should be put in the next Test Map's Initialization instead so I know what ones to put in the Map Initialization of my map.

Otherwise, it looks nice. It's better than what I was expecting.

Crushing Wave for a Special Effect is perfect by the way for shallow water grounds. The Dust Special Effect is nice for ramps / higher walkable dry grounds as I was talking about earlier. So if you can make it like that, it would be cool.

Example to the above: Say a unit is below a ramp where shallow water is, and someone uses the 'Thunder Slam' spell, the 'Crushing Wave' Special Effect would kick in, followed by the Dust Special Effect when the unit is pushed up on the ramp where there is no shallow water, just dirt and grass. The same would happen in reverse: Dust Effect first, then 'Crushing Wave' Effect when the unit slides down the ramp.

Also, take the stun out of the spell too, if any stun at all. I misused the word 'stun.' I forgot I originally wanted the spell to only slow enemies down instead. NOTE: the slowing of course does not need to be triggered, nor does the removal of the stun.

And why take collision off units? If you go doing that, my spells and attacks that deal damage won't deal damage because there's nothing to hit without collision. Won't keeping unit collisions ON be better? Doesn't it prevent units from hitting things like trees, etc. anyway? Or am I missing something here?

UPDATE: I did a test and put walls in, trees, etc. in the Test Map you gave me, and the units did not go passed walls or trees. That would only happen if you took collision off the units.

NOTE: If you do re-create what you did in GUI to JASS, and since I'm terrible at it, can you please add Green Comment Lines on what things can be edited, per se, the distance units get pushed back, acceleration speed, etc. so I can tweak these values if they need to be tweaked some? Otherwise, leave those values as they are like you have them in the original Test Map you sent me.

And please no, lol, don't make units that are pushed into trees knock down trees . . . That would be hilarious but I don't want that.
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
You can try any special effect you want by just replacing the Model used in the Special Effect. We could make an specific special effect based on the position of the unit (water if it's in water, snow if it's in snow, etc.)...

When a unit reaches unwalkable terrain (cliff, block pather, etc.) it just remains stunned there without moving further. If it reaches trees it takes them down.


vJASS is different than JASS; and I just know JASS, not vJASS xD I'll probably do this tomorrow
 
Level 4
Joined
Aug 9, 2012
Messages
84
[removed message via what looked like a double post, and merged with another message]
 
Last edited:
Level 4
Joined
Aug 9, 2012
Messages
84
For my own curiosity . . . Is it just that vJASS is easier to write than JASS, or does vJASS outperform regular JASS? I know there were always differences between the two, but never asked what their differences were.

Thanks.
 
Level 4
Joined
Aug 9, 2012
Messages
84
No. I tested this now . . . I clicked reply to the other guy and my latest post under the reply I made to you makes it look like a double post. I notice that. When you reply to the person your comment isn't always directly under that person's comment.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Lets not go so far...

GUI is slow mostly because uses BJ's and limits the user access to natives.
JASS is Ok. vJASS uses some JASS tricks to improve it's efficiency, basically at writing it (which makes it easier and shorter), but, at the end, compiler turns everything to JASS and natives.
 
true but vJass compiles it into more efficient Jass than Jass normally compiles it into.
vJass is faster and a lot more user friendly. It allows a user to have libraries, scopes, structs inside those. Constant values, which are values that u cant change by using the set keyword. private variables, which are variables that can only be seen inside the struct, library, scope it was made in.
libraries go to the maps header so if that library is a system it will be at the top. This means it can be easily used by other functions / triggers.
libraries can also require other libraries, which make them very valuable to systems.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Yes, you write it that way, but Wc3 doesn't reads vJASS, it just reads JASS. vJASS compiler turns all that vJASS code into JASS to make it readable by Wc3

Nestharus has a tutorial that explains exactly what vJASS does..
 
Status
Not open for further replies.
Top