- Joined
- May 16, 2020
- Messages
- 662
Hi guys,
I'm trying to formulate a trigger which throws fireballs in a parabola to random points in the target area for 10 seconds (the parabola should go "up and down" as well as "left/right", i.e. both X/Y and Z need to be adjusted throughout the flight of the projectile).
Creating the Parabola for the Z worked. But I'm lost at creating the parabola for the X and Y of a point.
I'm aware there are missile systems which do the same, but my problem with those is that they work based on using units for projectiles. I want to use Specialeffects directly instead (since I read that this is a lot more efficient than creating units).
Can someone please help?
***
I'm trying to formulate a trigger which throws fireballs in a parabola to random points in the target area for 10 seconds (the parabola should go "up and down" as well as "left/right", i.e. both X/Y and Z need to be adjusted throughout the flight of the projectile).
Creating the Parabola for the Z worked. But I'm lost at creating the parabola for the X and Y of a point.
I'm aware there are missile systems which do the same, but my problem with those is that they work based on using units for projectiles. I want to use Specialeffects directly instead (since I read that this is a lot more efficient than creating units).
Can someone please help?
***
-
TBD
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Blaze
-
-

Actions
-


Set VariableSet AA_Index = (AA_Index + 1)
-


Set VariableSet AA_Caster[AA_Index] = (Triggering unit)
-


Set VariableSet AA_Counter[AA_Index] = 0
-


Set VariableSet AA_CounterMax[AA_Index] = 334
-


Set VariableSet AA_PointOrigin[AA_Index] = (Position of AA_Caster[AA_Index])
-


Set VariableSet AA_PointTarget[AA_Index] = (Target point of ability being cast)
-


-------- --------
-


-------- --------
-


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



If - Conditions
-




AA_Index Equal to 1
-
-



Then - Actions
-




Game - Display to (All players) the text: ON
-




Countdown Timer - Start AA_Timer as a Repeating timer that will expire in 0.03 seconds
-




Trigger - Turn on TBD Loop <gen>
-
-



Else - Actions
-
-
-
-
TBD Loop
-

Events
-


Time - AA_Timer expires
-
-

Conditions
-

Actions
-


For each (Integer AA_Integer) from 1 to AA_Index, do (Actions)
-



Loop - Actions
-




Set VariableSet AA_Counter[AA_Integer] = (AA_Counter[AA_Integer] + 1)
-




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





If - Conditions
-






AA_Counter[AA_Integer] Less than AA_CounterMax[AA_Integer]
-






(AA_Counter[AA_Integer] mod 5) Equal to 0
-
-





Then - Actions
-






Set VariableSet AA_PointTemp = (AA_PointTarget[AA_Integer] offset by (Random real number between 0.00 and 200.00) towards (Random angle) degrees.)
-






-------- --------
-






Set VariableSet AA_Index2 = (AA_Index2 + 1)
-






Game - Display to (All players) the text: (String(AA_Index2))
-






Set VariableSet AA_Angle[AA_Index2] = (Angle from AA_PointOrigin[AA_Integer] to AA_PointTemp)
-






Set VariableSet AA_Speed[AA_Index2] = 25.00
-






Set VariableSet AA_DistanceReached[AA_Index2] = 0.00
-






Set VariableSet AA_DistanceMax[AA_Index2] = (Distance between AA_PointOrigin[AA_Integer] and AA_PointTemp)
-






-------- HEIGHT --------
-






Set VariableSet AA_HeigthAdjustor[AA_Index2] = (Random real number between 0.10 and 0.50)
-






Set VariableSet AA_HeightReal[AA_Index2] = (AA_DistanceMax[AA_Index2] x AA_HeigthAdjustor[AA_Index2])
-






Set VariableSet AA_HeightDegree[AA_Index2] = 0.00
-






-------- X-AXIS --------
-






Set VariableSet AA_X_Adjustor[AA_Index2] = (Random real number between 0.10 and 0.50)
-






Set VariableSet AA_X_Real[AA_Index2] = (AA_DistanceMax[AA_Index2] x AA_X_Adjustor[AA_Index2])
-






Set VariableSet AA_X_Degree[AA_Index2] = 0.00
-






-------- --------
-






Special Effect - Create a special effect at AA_PointOrigin[AA_Integer] using Abilities\Spells\Other\Volcano\VolcanoMissile.mdl
-






Set VariableSet AA_SFX[AA_Index2] = (Last created special effect)
-






Special Effect - Set Yaw of AA_SFX[AA_Index2] to: (AA_Angle[AA_Index2] x (Pi / 180.00))
-






-------- --------
-






Custom script: call RemoveLocation(udg_AA_PointTemp)
-
-





Else - Actions
-
-




-------- --------
-




For each (Integer AA_Integer2) from 1 to AA_Index2, do (Actions)
-





Loop - Actions
-






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







If - Conditions
-








AA_DistanceReached[AA_Integer2] Less than AA_DistanceMax[AA_Integer2]
-
-







Then - Actions
-








Set VariableSet AA_DistanceReached[AA_Integer2] = (AA_DistanceReached[AA_Integer2] + AA_Speed[AA_Integer2])
-








-------- --------
-








-------- HEIGHT --------
-








Set VariableSet AA_HeightDegree[AA_Integer2] = (AA_HeightDegree[AA_Integer2] + (180.00 / (AA_DistanceMax[AA_Integer2] / AA_Speed[AA_Integer2])))
-








Set VariableSet AA_HeightReached[AA_Integer2] = ((Sin(AA_HeightDegree[AA_Integer2])) x AA_HeightReal[AA_Integer2])
-








-------- --------
-








-------- X-AXIS --------
-








Set VariableSet AA_X_Degree[AA_Integer2] = (AA_X_Degree[AA_Integer2] + (180.00 / (AA_DistanceMax[AA_Integer2] / AA_Speed[AA_Integer2])))
-








Set VariableSet AA_X_Reached[AA_Integer2] = ((Sin(AA_X_Degree[AA_Integer2])) x AA_HeightReal[AA_Integer2])
-








-------- --------
-








Set VariableSet AA_PointTemp = (AA_PointOrigin[AA_Integer] offset by AA_DistanceReached[AA_Integer2] towards (AA_Angle[AA_Integer2] + AA_X_Reached[AA_Integer2]) degrees.)
-








-------- --------
-








Special Effect - Set Position of AA_SFX[AA_Integer2] to x: (X of AA_PointTemp), y: (Y of AA_PointTemp), z: AA_HeightReached[AA_Integer2]
-








-------- --------
-








Custom script: call RemoveLocation(udg_AA_PointTemp)
-
-







Else - Actions
-








Special Effect - Destroy AA_SFX[AA_Integer2]
-








-------- --------
-








Set VariableSet AA_Angle[AA_Integer2] = AA_Angle[AA_Index2]
-








Set VariableSet AA_Speed[AA_Integer2] = AA_Speed[AA_Index2]
-








Set VariableSet AA_DistanceReached[AA_Integer2] = AA_DistanceReached[AA_Index2]
-








Set VariableSet AA_DistanceMax[AA_Integer2] = AA_DistanceMax[AA_Index2]
-








Set VariableSet AA_HeigthAdjustor[AA_Integer2] = AA_HeigthAdjustor[AA_Index2]
-








Set VariableSet AA_HeightReal[AA_Integer2] = AA_HeightReal[AA_Index2]
-








Set VariableSet AA_HeightDegree[AA_Integer2] = AA_HeightDegree[AA_Index2]
-








Set VariableSet AA_X_Adjustor[AA_Integer2] = AA_X_Adjustor[AA_Index2]
-








Set VariableSet AA_X_Real[AA_Integer2] = AA_X_Real[AA_Index2]
-








Set VariableSet AA_X_Degree[AA_Integer2] = AA_X_Degree[AA_Index2]
-








Set VariableSet AA_SFX[AA_Integer2] = AA_SFX[AA_Index2]
-








-------- --------
-








Set VariableSet AA_Index2 = (AA_Index2 - 1)
-








Set VariableSet AA_Integer2 = (AA_Integer2 - 1)
-








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









If - Conditions
-










AA_Index2 Equal to 0
-
-









Then - Actions
-










-------- TBD? --------
-
-









Else - Actions
-
-
-
-
-
-




-------- --------
-




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





If - Conditions
-






AA_Counter[AA_Integer] Greater than or equal to AA_CounterMax[AA_Integer]
-






AA_Index2 Equal to 0
-
-





Then - Actions
-






Custom script: call RemoveLocation(udg_AA_PointOrigin[udg_AA_Integer])
-






Custom script: call RemoveLocation(udg_AA_PointTarget[udg_AA_Integer])
-






-------- --------
-






Set VariableSet AA_Caster[AA_Integer] = AA_Caster[AA_Index]
-






Set VariableSet AA_Counter[AA_Integer] = AA_Counter[AA_Index]
-






Set VariableSet AA_CounterMax[AA_Integer] = AA_CounterMax[AA_Index]
-






Set VariableSet AA_PointOrigin[AA_Integer] = AA_PointOrigin[AA_Index]
-






Set VariableSet AA_PointTarget[AA_Integer] = AA_PointTarget[AA_Index]
-






-------- --------
-






Set VariableSet AA_Index = (AA_Index - 1)
-






Set VariableSet AA_Integer = (AA_Integer - 1)
-






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







If - Conditions
-








AA_Index Equal to 0
-
-







Then - Actions
-








Game - Display to (All players) the text: OFF
-








Countdown Timer - Pause AA_Timer
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-
-



