- Joined
- Mar 15, 2012
- Messages
- 2,878
Something nobody has ever attempted before... Unique o.o
So ya..... The problem is the angles, everything else works. The shape has to be a perfect circle, but it doesn't want to be it seems.
If anybody has any idea's I would greatly appreciate it if you shared some because me and my friend are fresh out.
Example of what it should look like
Duration of video/example = 0.32 - 0.40
Before that is when not moving and that was the easy part.
So ya..... The problem is the angles, everything else works. The shape has to be a perfect circle, but it doesn't want to be it seems.
If anybody has any idea's I would greatly appreciate it if you shared some because me and my friend are fresh out.
[Trigger=]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Plasma Wave
Actions
-------- Do not modify this part. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_CurrentIndex Equal to 0
Then - Actions
Trigger - Turn on PlasmaLoop <gen>
Else - Actions
Set PW_CurrentIndex = (PW_CurrentIndex + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_CurrentIndex Greater than PW_MaxIndex
Then - Actions
Set PW_Index[PW_CurrentIndex] = PW_CurrentIndex
Set PW_MaxIndex = PW_CurrentIndex
Else - Actions
Set TempInt = PW_Index[PW_CurrentIndex]
Custom script: if udg_PW_UGroup[udg_TempInt] == null then
Custom script: set udg_PW_UGroup[udg_TempInt] = CreateGroup()
Custom script: endif
Set PW_Angle[TempInt] = 0.00
Set PW_Caster[TempInt] = (Triggering unit)
Set PW_Stage2[TempInt] = False
Set PW_Size[TempInt] = 100.00
Set PW_MaxDistance[TempInt] = 0.00
-------- You can modify everything below. --------
-------- 1 to 36 This creates 36 units. Upon creating less or more units set the angle to 360/how many units it spawns --------
For each (Integer TempInt2) from 1 to 36, do (Actions)
Loop - Actions
Set PW_Angle[TempInt] = (PW_Angle[TempInt] + (360.00 / 36.00))
Set PW_Angle2[TempInt2] = PW_Angle[TempInt]
Set TempPoint = (Position of (Triggering unit))
Set TempPoint2 = (TempPoint offset by 15.00 towards PW_Angle[TempInt] degrees)
Set XCord = (X of TempPoint2)
Set YCord = (Y of TempPoint2)
Unit - Create 1 PlasmaDummy for (Owner of (Triggering unit)) at (Point(XCord, YCord)) facing PW_Angle[TempInt] degrees
Unit Group - Add (Last created unit) to PW_UGroup[TempInt]
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
[/Trigger]
[Trigger=]
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer PW_Loop) from 1 to PW_CurrentIndex, do (Actions)
Loop - Actions
Set TempInt = PW_Index[PW_Loop]
Set PW_Size[TempInt] = (PW_Size[TempInt] + 0.01)
Set PW_Integer[TempInt] = 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Stage2[TempInt] Equal to True
Then - Actions
Set PW_MaxDistance[TempInt] = (PW_MaxDistance[TempInt] - 15.00)
Else - Actions
Set PW_MaxDistance[TempInt] = (PW_MaxDistance[TempInt] + 15.00)
Unit Group - Pick every unit in PW_UGroup[TempInt] and do (Actions)
Loop - Actions
Set PW_Integer[TempInt] = (PW_Integer[TempInt] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Stage2[TempInt] Equal to False
PW_MaxDistance[TempInt] Less than 795.00
Then - Actions
Set TempPoint = (Position of (Picked unit))
Set TempPoint2 = (Position of PW_Caster[TempInt])
Set PW_Angle[TempInt] = (Angle from TempPoint2 to TempPoint)
Set PW_Distance = (Distance between TempPoint and TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Equal to PW_MaxDistance[TempInt]
Then - Actions
Set TempPoint3 = (TempPoint offset by 15.00 towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Greater than PW_MaxDistance[TempInt]
Then - Actions
Set PW_DistanceDifference = (PW_Distance - PW_MaxDistance[TempInt])
Set TempPoint3 = (TempPoint offset by (PW_DistanceDifference x -1.00) towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Less than PW_MaxDistance[TempInt]
Then - Actions
Set PW_DistanceDifference = (PW_MaxDistance[TempInt] - PW_Distance)
Set TempPoint3 = (TempPoint offset by PW_DistanceDifference towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
Animation - Change (Picked unit)'s size to (PW_Size[TempInt]%, PW_Size[TempInt]%, PW_Size[TempInt]%) of its original size
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_MaxDistance[TempInt] Greater than or equal to 795.00
Then - Actions
Set PW_Stage2[TempInt] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Stage2[TempInt] Equal to True
Then - Actions
Set TempPoint = (Position of (Picked unit))
Set TempPoint2 = (Position of PW_Caster[TempInt])
Set PW_Angle[TempInt] = (Angle from TempPoint to TempPoint2)
Set PW_Distance = (Distance between TempPoint and TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Equal to PW_MaxDistance[TempInt]
Then - Actions
Set TempPoint3 = (TempPoint offset by -15.00 towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
PW_Distance Greater than PW_MaxDistance[TempInt]
PW_Distance Less than PW_MaxDistance[TempInt]
Then - Actions
Set PW_DistanceDifference = (PW_MaxDistance[TempInt] - PW_Distance)
Set TempPoint3 = (TempPoint offset by PW_DistanceDifference towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
Animation - Change (Picked unit)'s size to (PW_Size[TempInt]%, PW_Size[TempInt]%, PW_Size[TempInt]%) of its original size
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_MaxDistance[TempInt] Less than or equal to 30.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in PW_UGroup[TempInt]) Equal to 0
Then - Actions
Custom script: call DestroyGroup(udg_PW_UGroup[udg_TempInt])
Set PW_Index[PW_Loop] = PW_Index[PW_CurrentIndex]
Set PW_Index[PW_CurrentIndex] = TempInt
Set PW_CurrentIndex = (PW_CurrentIndex - 1)
Set PW_Loop = (PW_Loop - 1)
Else - Actions
Unit - Remove (Picked unit) from the game
Unit Group - Remove (Picked unit) from PW_UGroup[TempInt]
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_CurrentIndex Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Skip remaining actions
Else - Actions
[/Trigger]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Plasma Wave
Actions
-------- Do not modify this part. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_CurrentIndex Equal to 0
Then - Actions
Trigger - Turn on PlasmaLoop <gen>
Else - Actions
Set PW_CurrentIndex = (PW_CurrentIndex + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_CurrentIndex Greater than PW_MaxIndex
Then - Actions
Set PW_Index[PW_CurrentIndex] = PW_CurrentIndex
Set PW_MaxIndex = PW_CurrentIndex
Else - Actions
Set TempInt = PW_Index[PW_CurrentIndex]
Custom script: if udg_PW_UGroup[udg_TempInt] == null then
Custom script: set udg_PW_UGroup[udg_TempInt] = CreateGroup()
Custom script: endif
Set PW_Angle[TempInt] = 0.00
Set PW_Caster[TempInt] = (Triggering unit)
Set PW_Stage2[TempInt] = False
Set PW_Size[TempInt] = 100.00
Set PW_MaxDistance[TempInt] = 0.00
-------- You can modify everything below. --------
-------- 1 to 36 This creates 36 units. Upon creating less or more units set the angle to 360/how many units it spawns --------
For each (Integer TempInt2) from 1 to 36, do (Actions)
Loop - Actions
Set PW_Angle[TempInt] = (PW_Angle[TempInt] + (360.00 / 36.00))
Set PW_Angle2[TempInt2] = PW_Angle[TempInt]
Set TempPoint = (Position of (Triggering unit))
Set TempPoint2 = (TempPoint offset by 15.00 towards PW_Angle[TempInt] degrees)
Set XCord = (X of TempPoint2)
Set YCord = (Y of TempPoint2)
Unit - Create 1 PlasmaDummy for (Owner of (Triggering unit)) at (Point(XCord, YCord)) facing PW_Angle[TempInt] degrees
Unit Group - Add (Last created unit) to PW_UGroup[TempInt]
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
[/Trigger]
[Trigger=]
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer PW_Loop) from 1 to PW_CurrentIndex, do (Actions)
Loop - Actions
Set TempInt = PW_Index[PW_Loop]
Set PW_Size[TempInt] = (PW_Size[TempInt] + 0.01)
Set PW_Integer[TempInt] = 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Stage2[TempInt] Equal to True
Then - Actions
Set PW_MaxDistance[TempInt] = (PW_MaxDistance[TempInt] - 15.00)
Else - Actions
Set PW_MaxDistance[TempInt] = (PW_MaxDistance[TempInt] + 15.00)
Unit Group - Pick every unit in PW_UGroup[TempInt] and do (Actions)
Loop - Actions
Set PW_Integer[TempInt] = (PW_Integer[TempInt] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Stage2[TempInt] Equal to False
PW_MaxDistance[TempInt] Less than 795.00
Then - Actions
Set TempPoint = (Position of (Picked unit))
Set TempPoint2 = (Position of PW_Caster[TempInt])
Set PW_Angle[TempInt] = (Angle from TempPoint2 to TempPoint)
Set PW_Distance = (Distance between TempPoint and TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Equal to PW_MaxDistance[TempInt]
Then - Actions
Set TempPoint3 = (TempPoint offset by 15.00 towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Greater than PW_MaxDistance[TempInt]
Then - Actions
Set PW_DistanceDifference = (PW_Distance - PW_MaxDistance[TempInt])
Set TempPoint3 = (TempPoint offset by (PW_DistanceDifference x -1.00) towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Less than PW_MaxDistance[TempInt]
Then - Actions
Set PW_DistanceDifference = (PW_MaxDistance[TempInt] - PW_Distance)
Set TempPoint3 = (TempPoint offset by PW_DistanceDifference towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
Animation - Change (Picked unit)'s size to (PW_Size[TempInt]%, PW_Size[TempInt]%, PW_Size[TempInt]%) of its original size
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_MaxDistance[TempInt] Greater than or equal to 795.00
Then - Actions
Set PW_Stage2[TempInt] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Stage2[TempInt] Equal to True
Then - Actions
Set TempPoint = (Position of (Picked unit))
Set TempPoint2 = (Position of PW_Caster[TempInt])
Set PW_Angle[TempInt] = (Angle from TempPoint to TempPoint2)
Set PW_Distance = (Distance between TempPoint and TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_Distance Equal to PW_MaxDistance[TempInt]
Then - Actions
Set TempPoint3 = (TempPoint offset by -15.00 towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
PW_Distance Greater than PW_MaxDistance[TempInt]
PW_Distance Less than PW_MaxDistance[TempInt]
Then - Actions
Set PW_DistanceDifference = (PW_MaxDistance[TempInt] - PW_Distance)
Set TempPoint3 = (TempPoint offset by PW_DistanceDifference towards PW_Angle2[PW_Integer[TempInt]] degrees)
Set XCord = (X of TempPoint3)
Set YCord = (Y of TempPoint3)
Custom script: call RemoveLocation (udg_TempPoint3)
Unit - Move (Picked unit) instantly to (Point(XCord, YCord)), facing PW_Angle[TempInt] degrees
Else - Actions
Animation - Change (Picked unit)'s size to (PW_Size[TempInt]%, PW_Size[TempInt]%, PW_Size[TempInt]%) of its original size
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_MaxDistance[TempInt] Less than or equal to 30.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in PW_UGroup[TempInt]) Equal to 0
Then - Actions
Custom script: call DestroyGroup(udg_PW_UGroup[udg_TempInt])
Set PW_Index[PW_Loop] = PW_Index[PW_CurrentIndex]
Set PW_Index[PW_CurrentIndex] = TempInt
Set PW_CurrentIndex = (PW_CurrentIndex - 1)
Set PW_Loop = (PW_Loop - 1)
Else - Actions
Unit - Remove (Picked unit) from the game
Unit Group - Remove (Picked unit) from PW_UGroup[TempInt]
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PW_CurrentIndex Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Skip remaining actions
Else - Actions
[/Trigger]
Example of what it should look like
Duration of video/example = 0.32 - 0.40
Before that is when not moving and that was the easy part.
Attachments
Last edited: