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

How to get shockwave location

Status
Not open for further replies.
Level 11
Joined
Feb 22, 2006
Messages
752
If you want to just add damage to an already existing shockwave ability that can be cast normally and does dmg, then you can use Vexorian's Caster System and use the collision missile functions. Have the collision missile originate from the unit casting shockwave and move in the direction of shockwave (use GetSpellTargetLoc() and AngleBetweenPoints() to get the direction) and set the missile's collision and travel distance to match tht of your shockwave spell. When it detects a collision, just damage the units tht trigger the collision using UnitDamageTarget().

Get the Caster System from wc3campaigns.net. Note: versions 14.0 and later require vJass/Jasshelper, so you'll need to get those as well from wc3campaigns.net.
 
Level 11
Joined
Feb 22, 2006
Messages
752
Actually yes u can do tht in normal WE, it's just that in the time it takes you to write down all the code you might as well just use Vexorian's Caster System. Btw the Caster System isn't a program or a hack. It's a collection of functions and script. vJass, which is required for Caster System 14.0 or newer, is a preprocessor, and is extremely easy to implement. Just dl the jass newgen pack, extract and use the newgenWE.exe instead of your normal WE exe. I have attached the necessary files for you. Just extract the .7z files and then the folders inside (you'll need WinRAR), then replace the jasshelper.exe in the newgen folder with the newer exe in the jasshelper.7z archive.

If you are still adamantly opposed to using the Caster System, I can write the script for you.
 

Attachments

  • Jass NewGen.rar
    3 MB · Views: 27
Level 19
Joined
Aug 24, 2007
Messages
2,888
-.- you dont need anyother tool to make a custom shockwave spell
really you dont need
just an easy jass code


BUT

Still you should use Jass NewGen Pack
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
You could simply make 2 dummies cast the shockwave spell in triggers, but those spells they cast, could have shorter range and the level of their ability could be adjusted after heroes current level shockwave. 1st dummy shockwave 500 range, 2nd 850 and heroes shockwave perhaps 1200. Just an example.


  • Shockwave Strength
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add Shockwave (Short) to (Last created unit)
      • Unit - Set level of Shockwave (Short) for (Last created unit) to (Level of Shockwave for (Triggering unit))
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)
      • Unit - Kill (Last created unit)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add Shockwave (Medium) to (Last created unit)
      • Unit - Set level of Shockwave (Medium) for (Last created unit) to (Level of Shockwave for (Triggering unit))
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)
      • Unit - Kill (Last created unit)
I dunno if there is any leaks to be removed

__________

Or you could be more accurate and use JASS, which I don't understand ^^
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Yes, and then all the point of the damage being based on states is gone.

If you don't want to use all that JASS stuff you can make something like this

  • Actions
    • Set Point[0] = (Position of (Triggering unit))
    • Set Point[1] = (Target point of ability being cast)
    • For each (Integer A) from 2 to 5, do (Actions)
      • Loop - Actions
        • Set Point[(Integer A)] = (Point[0] offset by (((Distance between Point[0] and Point[1]) / 5.00) x (Real((Integer A)))) towards (Angle from Point[0] to Point[1]) degrees)
        • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius ((Distance between Point[0] and Point[2]) - 10.00) at Point[(Integer A)], dealing (Real((Intelligence of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal
        • -------- The point of the -10 at the radius is because if it would be exacly the length of Point[0] - Point[1] it would also damage the caster --------
    • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius ((Distance between Point[0] and Point[2]) - 10.00) at Point[1], dealing (Real((Intelligence of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal

I think this should work.
If it has some mathematic problems its just because im tired so fix them :wsmile:

The only big problem I could find in this is that it would damage all the places at exacly the same time.
You could solve it with a "wait" based on the spell length (or it doesn't even need to be based on length at all since shockwave doesn't go based on where you point it to go but only at the direction you point it to go).
 
another solution.

make the shockwave triggered,

have a dummy unit with immolation, that looks like a shockwave,
when casts ability create dummy unit at position of casting unit for for owner of unit of triggering unit action integer A trigger thin going to about 20? that moves the last created unit to position of lastcreated unit offset by about maybe 20-30? And make sure ur dummy unit has maybe 6 hp with -2 regen or something

then you check the units with the immolation buff hit by the shockwave and deal extra dmg.

i think that was kinda unclear XD
 
Status
Not open for further replies.
Top