Warcraft III resources & community, 2003–2006 · archived

Pushback nova spell help

7 posts
#1

Pushback nova spell help

Here's the triggers i made for what i wanted to be a simple nova pushback spell that delas more dmaage the closer you were. here are the two trigs:

RP setup
Events
Unit - Glacial Pandaren 0014 <gen> Starts the effect of an ability
Conditions
(Ability being cast) Equal to Reverse Polarity
Actions
Set RP_distanceReal = 20.00
Set NovaAnglereleaseFrost = 0.00
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Unit - Create 1 Reverse Polarity Unit for (Owner of Glacial Pandaren 0014 <gen>) at ((Position of Glacial Pandaren 0014 <gen>) offset by 35.00 towards NovaAnglereleaseFrost degrees) facing Default building facing degrees
Set NovaAnglereleaseFrost = (NovaAnglereleaseFrost + 60.00)
Trigger - Turn on RP Move Units back <gen>


And the other one


RP Move Units back
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RP_distanceReal Greater than or equal to (500.00 + (((Max life of Glacial Pandaren 0014 <gen>) - (Life of Glacial Pandaren 0014 <gen>)) / 3.00))
Then - Actions
Unit Group - Pick every unit in (Units of type Reverse Polarity Unit) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Trigger - Turn off (This trigger)
Else - Actions
Set RP_distanceReal = (RP_distanceReal + 1.00)
Unit Group - Pick every unit in (Units of type Reverse Polarity Unit) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to ((Position of Glacial Pandaren 0014 <gen>) offset by RP_distanceReal towards (Angle from (Position of Glacial Pandaren 0014 <gen>) to (Position of (Picked unit))) degrees)
Unit Group - Pick every unit in (Units within RP_distanceReal of (Position of Glacial Pandaren 0014 <gen>) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) Equal to (Random player from (All enemies o and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 1.00 towards (Angle from (Position of Glacial Pandaren 0014 <gen>) to (Position of (Picked unit))) degrees)
Unit - Order Glacial Pandaren 0014 <gen> to damage (Picked unit) for 0.60 using attack type Spells and damage type Cold.



Hopefully someone can point out what's goin wrong because this simply lags and doesn't even move the units. So i dunno.

BTW if you show me a spell to mimic, it has to be written in the same fashion as this one so no JASS or any of that stuff.
#2
It looks fine...

I have an idea theres an "old" map to RoC called "Doomsday stand" and there is a spell with rep(if im remeber well its ability of enforcer).SO you can just check there and see whats wrong with yours.

If you dont have that map, its on this site. its ver 0.9

goodluck anyways
#3
ok i fixed it up and i found the problem (i got it to check fopr units that were only an enemy and neutral instead of enemy or neutral)


It looks like this noiw (used custom value to ensure the right angle.

RP setup
Events
Unit - Glacial Pandaren 0014 <gen> Starts the effect of an ability
Conditions
(Ability being cast) Equal to Reverse Polarity
Actions
Unit - Remove RP_DeadCenterpointDummy from the game
Unit - Create 1 Universal Dummy Unit for (Owner of Glacial Pandaren 0014 <gen>) at (Position of Glacial Pandaren 0014 <gen>) facing Default building facing degrees
Set RP_DeadCenterpointDummy = (Last created unit)
Unit - Move RP_DeadCenterpointDummy instantly to (Position of Glacial Pandaren 0014 <gen>)
Set RP_distanceReal = 0.00
Set NovaAnglereleaseFrost = 0.00
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Create 1 Reverse Polarity Unit for (Owner of Glacial Pandaren 0014 <gen>) at ((Position of Glacial Pandaren 0014 <gen>) offset by 0.00 towards NovaAnglereleaseFrost degrees) facing Default building facing degrees
Set NovaAnglereleaseFrost = (NovaAnglereleaseFrost + 18.00)
Unit - Set the custom value of (Last created unit) to (Integer(NovaAnglereleaseFrost))
Trigger - Turn on RP Move Units back <gen>


and the other (which i'm assuming is causing the lag)



RP Move Units back
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
RP_distanceReal Greater than or equal to (700.00 + (((Max life of Glacial Pandaren 0014 <gen>) - (Life of Glacial Pandaren 0014 <gen>)) / 5.00))
Then - Actions
Unit Group - Pick every unit in (Units of type Reverse Polarity Unit) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Unit - Remove RP_DeadCenterpointDummy from the game
Trigger - Turn off (This trigger)
Else - Actions
Set RP_distanceReal = (RP_distanceReal + 10.00)
Unit Group - Pick every unit in (Units of type Reverse Polarity Unit) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to ((Position of RP_DeadCenterpointDummy) offset by RP_distanceReal towards (Real((Custom value of (Picked unit)))) degrees)
Unit Group - Pick every unit in (Units within RP_distanceReal of (Position of RP_DeadCenterpointDummy) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) Equal to (Random player from (All enemies of (O and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 20.00 towards (Angle from (Position of RP_DeadCenterpointDummy) to (Position of (Picked unit))) degrees)
Unit - Order Glacial Pandaren 0014 <gen> to damage (Picked unit) for 20.00 using attack type Spells and damage type Cold.



The part's that missing is just specifying that they are enemies of my hero and only my hero.


Anyways, i wanna know how i can eliminate the lag.
#4
I changed it to make an effect every X distance and now it works pretty god, but it lags quite a bit. I suppose i could fix that but i want the wave to maintain a constant size. Perhaps there is another way....
#5
I don't know exactly what your spell is but in the Daelin's JASS tutorial is example of pushback nova.
#6
My tutorial by now includes only a simple knockback spell. To make it work with a nova, you would need to pick up every unit and so, you would need handlers. Hmm... I'll have to think about it. There is a Knockback Nova here. Search for it a little.. Wait! Here it is!

~Daelin
#7
Wow i've been looking for that. Actually it's pretty simple how it was done; i'm impressed and this has really fixed my problem. thx for dinfing it.