• 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.

[JASS] How to do shockwave

Status
Not open for further replies.
Level 4
Joined
Jul 20, 2005
Messages
107
Anyone know how to do shockwave, the same as blizzard made..
*NOTE: the wave of shockwave did not stop at the target position unless it reaches the maximum range..

Please help me on this.. thank you very much..
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
this spell use an oriented rectangle (not just a rect).
i've done a system to define an oriented rect with 2 locations and a width but i must add methods and place many comments ...
So i think i will post it at the end of the next week.
i will recreate the shockwave as an example of what the system can do.
But btw why you don't just use the schockwave with a dummy unit ?
 
Last edited:
Level 4
Joined
Jul 20, 2005
Messages
107
Well cause I am new to JASS and i wanna learn more before i can actually good at it.. I mean i try to write my own JASS and it ended up a lot of problem... Oh well..

Can you explain how oriented rectangle and rect works? Hope you don't mind since i am new to JASS
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
it's virtual, i don't create rect but just play with 4 locations.
i mean normal rect are always like that :

Code:
A           B            

C           D

Code:
A      B



C      D

so for a rect you need to know only xMin,yMin,Xmax,yMax.

there is an ugly picture :
attachment.php

the three is an oriented rect.
 
Level 4
Joined
Jul 20, 2005
Messages
107
Ya but the shockwave didn't just kill all the unit in the area instantly right? It die the shockwave touch the unit right?

And another question is how we going to get the min and max for x and y?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Ya but the shockwave didn't just kill all the unit in the area instantly right? It die the shockwave touch the unit right?

And another question is how we going to get the min and max for x and y?

ofc, but it's a small rect which move and hurt units on this.
hard to explain my system without the code.
But for a rect you have these functions like that :
JASS:
native GetRectMaxX              takes rect whichRect returns real
and the same with Y and Min
 
Level 4
Joined
Jul 20, 2005
Messages
107
Instead of rect, can i use like circle? So when will you help me on the jass? Kind of need it as soon as possible haha.. Sorry to trouble you
 
Level 5
Joined
Aug 27, 2007
Messages
138
Create a dummy unit, and on a repeated timer, move it and do GroupEnumUnitsInRange to get the units around it. Damage these units, maybe do a special effect or whatever, and add them to a group which stores all the hit units so they don't get hit again. Destroy the dummy and stop the timer when it reaches its maximum range.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The problem with circles is, it can miss targets / hit targets twice.
Like this drawing shows (the black circles are targets).

In the first case (left), the spacing is one circle after another, and it might miss targets.
In the second cast (right), the spacing is smaller so you can hit targets on he end boundaries but it can hit targets twice.

So, if you are using circles, you will have to check if the targets were hit already once (it can be done in a lot of ways. The easiest one would be changing their Custom Value to something else for 1 second or so).
 

Attachments

  • Circles.JPG
    Circles.JPG
    7.4 KB · Views: 113
Status
Not open for further replies.
Top