Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
You'd be using Custom Script actions, which are JASS.Actually i managed to manipulate terrain height very easily with GUI.
Hmm, I know what you mean, but I'm not sure how to solve that.
You'd be using Custom Script actions, which are JASS.
function ParabolicMovement takes real h, real d, real x returns real
// h, d, and x are in the same units of distance in WC3, which is more comfortable to use :)
local real a = -4*h/(3*d*d)
local real b = 4*h/(3*d)
return a*x*x + b*x
endfunction
Nade

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Nade

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Owner of (Triggering unit)) Current lumber) Greater than 0



Then - Actions




Set TempPoint1 = (Position of (Triggering unit))




Set TempPoint2 = (Target point of ability being cast)




Unit - Create 1 Nade for (Owner of (Triggering unit)) at TempPoint1 facing ((Angle from TempPoint1 to TempPoint2) + 0.00) degrees




Unit - Turn collision for (Last created unit) Off




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Distance between TempPoint1 and TempPoint2) Less than or equal to 850.00





Then - Actions






Set HorizontalDistance = ((Distance between TempPoint1 and TempPoint2) + 0.00)





Else - Actions






Set TempPoint3 = (TempPoint1 offset by 850.00 towards (Angle from TempPoint1 to TempPoint2) degrees)






Set HorizontalDistance = 850.00






Custom script: call RemoveLocation (udg_TempPoint3)




Set Nade[(Player number of (Owner of (Triggering unit)))] = (Last created unit)




Set VerticalDistance = ((Z height of TempPoint2) - (Z height of TempPoint1))




Set Dist[(Player number of (Owner of (Triggering unit)))] = ((HorizontalDistance / 100.00) x (1.00 + (VerticalDistance / 1500.00)))




Set K[(Player number of (Owner of (Triggering unit)))] = (3.00 / (Dist[(Player number of (Owner of (Triggering unit)))] / 3.60))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






K[(Player number of (Owner of (Triggering unit)))] Greater than 3.00





Then - Actions






Set K[(Player number of (Owner of (Triggering unit)))] = 3.00





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








K[(Player number of (Owner of (Triggering unit)))] Less than 1.00







Then - Actions








Set K[(Player number of (Owner of (Triggering unit)))] = 1.00







Else - Actions




Set X[(Player number of (Owner of (Triggering unit)))] = 0.00




Set Speed[(Player number of (Owner of (Triggering unit)))] = 1.20




Set Facing[(Player number of (Owner of (Triggering unit)))] = (Angle from TempPoint1 to TempPoint2)




Set BaseHeight[(Player number of (Owner of (Triggering unit)))] = ((Z height of TempPoint1) + 50.00)




Set A[(Player number of (Owner of (Triggering unit)))] = (K[(Player number of (Owner of (Triggering unit)))] / (Power(((1.00 / 2.00) x Dist[(Player number of (Owner of (Triggering unit)))]), 2.00)))




Animation - Change (Last created unit) flying height to 60.00 at 0.00




Unit - Add a 3.00 second Generic expiration timer to (Last created unit)




Custom script: call RemoveLocation (udg_TempPoint1)




Custom script: call RemoveLocation (udg_TempPoint2)




Player - Add -1 to (Owner of (Triggering unit)) Current lumber



Else - Actions
Nade move

Events


Time - Every 0.01 seconds of game time

Conditions

Actions


For each (Integer A) from 1 to 12, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Nade[(Integer A)] Not equal to No unit





Then - Actions






Set TempPoint1 = (Position of Nade[(Integer A)])






Set TempPoint2 = (TempPoint1 offset by (Dist[(Integer A)] x Speed[(Integer A)]) towards Facing[(Integer A)] degrees)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Z height of TempPoint2) Greater than ((Current flying height of Nade[(Integer A)]) + (Z height of TempPoint1))







Then - Actions








Set TempPoint7 = (TempPoint2 offset by (Dist[(Integer A)] x (2.00 x Speed[(Integer A)])) towards (Facing[(Integer A)] + 180.00) degrees)








Set TempPoint3 = (TempPoint7 offset by (Dist[(Integer A)] x (2.00 x Speed[(Integer A)])) towards 90.00 degrees)








Set TempPoint4 = (TempPoint7 offset by (Dist[(Integer A)] x (2.00 x Speed[(Integer A)])) towards 270.00 degrees)








Set TempPoint5 = (TempPoint7 offset by (Dist[(Integer A)] x (2.00 x Speed[(Integer A)])) towards 180.00 degrees)








Set TempPoint6 = (TempPoint7 offset by (Dist[(Integer A)] x (2.00 x Speed[(Integer A)])) towards 0.00 degrees)








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










Or - Any (Conditions) are true











Conditions












(Z height of TempPoint3) Greater than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 5.00))












(Z height of TempPoint4) Greater than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 5.00))










(Z height of TempPoint5) Less than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 1.00))










(Z height of TempPoint6) Less than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 1.00))









Then - Actions










Custom script: call RemoveLocation (udg_TempPoint2)










Set Facing[(Integer A)] = (Facing[(Integer A)] - (2.00 x Facing[(Integer A)]))










Set TempPoint2 = (TempPoint1 offset by (Dist[(Integer A)] x 8.00) towards Facing[(Integer A)] degrees)









Else - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










Or - Any (Conditions) are true











Conditions












(Z height of TempPoint5) Greater than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 5.00))












(Z height of TempPoint6) Greater than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 5.00))










(Z height of TempPoint3) Less than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 1.00))










(Z height of TempPoint4) Less than ((Current flying height of Nade[(Integer A)]) + ((Z height of TempPoint1) + 1.00))









Then - Actions










Custom script: call RemoveLocation (udg_TempPoint2)










Set Facing[(Integer A)] = (Facing[(Integer A)] + (180.00 - (2.00 x Facing[(Integer A)])))










Set TempPoint2 = (TempPoint1 offset by (Dist[(Integer A)] x (1.50 x Speed[(Integer A)])) towards Facing[(Integer A)] degrees)









Else - Actions








Custom script: call RemoveLocation (udg_TempPoint3)








Custom script: call RemoveLocation (udg_TempPoint4)








Custom script: call RemoveLocation (udg_TempPoint5)








Custom script: call RemoveLocation (udg_TempPoint6)








Custom script: call RemoveLocation (udg_TempPoint7)







Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Current flying height of Nade[(Integer A)]) Less than or equal to 5.00








(Z height of TempPoint1) Less than ((Z height of TempPoint2) + 5.00)








(Z height of TempPoint1) Greater than ((Z height of TempPoint2) - 5.00)







Then - Actions








Set K[(Integer A)] = ((K[(Integer A)] + ((BaseHeight[(Integer A)] - (Z height of TempPoint2)) / 150.00)) / 2.00)








Set X[(Integer A)] = 0.00








Set Dist[(Integer A)] = (Dist[(Integer A)] - (((Z height of TempPoint2) - (Z height of TempPoint1)) x ((K[(Integer A)] x Dist[(Integer A)]) x 0.60)))








Set Dist[(Integer A)] = (Dist[(Integer A)] / 2.00)








Set Speed[(Integer A)] = (Speed[(Integer A)] x 1.50)








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










Dist[(Integer A)] Less than 0.00









Then - Actions










Set Facing[(Integer A)] = (Facing[(Integer A)] + 180.00)










Set Dist[(Integer A)] = (Dist[(Integer A)] x -1.00)









Else - Actions








Set BaseHeight[(Integer A)] = ((Z height of TempPoint2) + 6.00)








Set A[(Integer A)] = (K[(Integer A)] / (Power(((1.00 / 2.00) x Dist[(Integer A)]), 2.00)))








Unit - Set the custom value of Nade[(Integer A)] to 1







Else - Actions






Unit - Move Nade[(Integer A)] instantly to TempPoint2






Animation - Change Nade[(Integer A)] flying height to ((-100.00 x (A[(Integer A)] x (Power((X[(Integer A)] - ((1.00 / 2.00) x Dist[(Integer A)])), 2.00)))) - ((Z height of TempPoint2) + ((K[(Integer A)] x -100.00) - BaseHeight[(Integer A)]))) at 0.00






Set X[(Integer A)] = (X[(Integer A)] + ((Dist[(Integer A)] / 100.00) x Speed[(Integer A)]))






Custom script: call RemoveLocation (udg_TempPoint1)






Custom script: call RemoveLocation (udg_TempPoint2)





Else - Actions
