| 01-23-2006, 10:10 AM | #1 |
Is it possible to do a nova spell that pushes all the units affected away from the target? And GUI please. (yes I am starting to make spells so fear). |
| 01-23-2006, 10:14 AM | #2 |
Yes, but I don't think you can do it entirely GUI (at least I wouldn't want to). I think Blade.dk may have done a stomp spell in one of the demo maps around the forum that does something to what you're talking about. |
| 01-23-2006, 11:21 AM | #3 |
Anything is possible, but easier, and more efficient in JASS. |
| 01-23-2006, 01:37 PM | #4 |
Well know that I know that it can be done, can someone help me on how? |
| 01-23-2006, 01:50 PM | #5 |
I once made one of them, hated that spell it lagged too much no matter how I optimized it |
| 01-23-2006, 01:56 PM | #6 |
There is such a spell at wc3s, I will find the link. |
| 01-23-2006, 01:56 PM | #7 |
well... the general algorithm can look like this (requires Trigonometry Knowledge lvl3): Global - NovaPushPower - how fast it pushes units away Global - NovaDistance - maximum distance from nova focus point the unit can stay and still be affected Global - NovaDuration - how long does the pushback effect last Event/Condition Unit casts pushback nova Actions: 1) Pick all units within nova range and save them to group 2) pick every unit i) Calculate the difference between x coordinates of locations of target unit and caster ii) Calculate the difference between y coordinates of locations of target unit and caster iii) Calculate distance between caster and target (square root from (x^2+y^2)) iv) calculate sinus and cosinus of angle between x axis and line, passing through locations of target and caster (x/distance for cosinus, y/distance for sinus) v) optional - determine strenght of nova impact, by dividing (1-distance between targets) by maximum nova radius and multiplying it by nova power. If don't want push to lose strenght depending on distance to target, just use nova power variable as nova power in further calculations. vi) calculate target movement along x axis (nova power * cosinus) vii) calculate target movment along y axis (nova power * sinus) viii) change the target coordinates by calculated target movement every 0.1 second until NovaDuration runs out. That's how the general algorithm can look. Not sure its doable in GUI :/ I already see at least one case for ExecuteFunc() to be used, which is Jass only. Could be wrong though ^^ |
| 01-23-2006, 02:08 PM | #8 |
http://www.wc3sear.ch/index.php?p=Spells&ID=528&sid= If you wanted an already done pushback nova GUI spell, here it is. |
| 01-23-2006, 02:56 PM | #9 |
The only problem in this spell would be making non-leaking PolarProjectionBJ. |
| 01-23-2006, 03:20 PM | #11 | |
Quote:
|
| 01-23-2006, 06:15 PM | #12 |
Sadly he requested it to be only GUI, I was hoping for a chance to test out my newfound skills at using JASS |
