- Joined
- Apr 14, 2012
- Messages
- 2,901
Hello...
I made my first ever spell after I read the 'Static Shapes (GUI)' and 'Dynamic Effects (GUI)' Tutorial by Daelin, because I figured I could give it a try.
The triggers I made for the spell is a little long and I hope there's a way to shorten it. I wasn't really a good coder then, actually now I'm starting to improve slowly.
Also if there are any errors can you point it out? That would really help.
Thank you.
Sincerely,
MasterTrainer
I made my first ever spell after I read the 'Static Shapes (GUI)' and 'Dynamic Effects (GUI)' Tutorial by Daelin, because I figured I could give it a try.
The triggers I made for the spell is a little long and I hope there's a way to shorten it. I wasn't really a good coder then, actually now I'm starting to improve slowly.
Also if there are any errors can you point it out? That would really help.
-
Dark Arts Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Dark Arts
-
Actions
- Set Caster = (Triggering unit)
- Set Location = (Position of Caster)
- Environment - Create a 10.00 second Depression ripple deformation at Location with starting radius 1024.00, ending radius 1024.00, and depth 64.00, using 1.00 second ripples spaced 512.00 apart
- Environment - Change terrain type at (Position of Caster) to Outland - Rough Dirt Cliff using variation -1 in an area of size 4 and shape Circle
- Environment - Change terrain type at (Position of Caster) to Outland - Flat Stones using variation -1 in an area of size 3 and shape Circle
- Unit - Make Caster Invulnerable
- Special Effect - Create a special effect at Location using Abilities\Spells\Other\Awaken\Awaken.mdl
-
For each (Integer A) from 1 to 36, do (Actions)
-
Loop - Actions
- Unit - Create 1 Dummy 1 for Neutral Passive at (Location offset by 600.00 towards ((Real((Integer A))) x (360.00 / 36.00)) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
-
Loop - Actions
- Unit - Create 1 Dummy 1 for Neutral Passive at (Location offset by 600.00 towards ((Real(1)) x -70.00) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Wait 0.05 seconds
- Set Dummy_Unit[1] = (Last created unit)
- Set Point[1] = (Position of Dummy_Unit[1])
- Unit - Create 1 Dummy 1 for Neutral Passive at (Location offset by 600.00 towards ((Real(2)) x -70.00) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Set Dummy_Unit[2] = (Last created unit)
- Set Point[2] = (Position of Dummy_Unit[2])
- Wait 0.05 seconds
- Unit - Create 1 Dummy 1 for Neutral Passive at (Location offset by 600.00 towards ((Real(3)) x -70.00) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Set Dummy_Unit[3] = (Last created unit)
- Set Point[3] = (Position of Dummy_Unit[3])
- Wait 0.05 seconds
- Unit - Create 1 Dummy 1 for Neutral Passive at (Location offset by 600.00 towards ((Real(4)) x -70.00) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Set Dummy_Unit[4] = (Last created unit)
- Set Point[4] = (Position of Dummy_Unit[4])
- Wait 0.05 seconds
- Unit - Create 1 Dummy 1 for Neutral Passive at (Location offset by 600.00 towards ((Real(5)) x -70.00) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Set Dummy_Unit[5] = (Last created unit)
- Set Point[5] = (Position of Dummy_Unit[5])
-
For each (Integer A) from 1 to 36, do (Actions)
-
Loop - Actions
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 2 for Neutral Passive at (Point[2] offset by ((Real((Integer A))) x ((Distance between Point[2] and Point[4]) / 36.00)) towards (Angle from Point[2] to Point[4]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 2 for Neutral Passive at (Point[4] offset by ((Real((Integer A))) x ((Distance between Point[4] and Point[1]) / 36.00)) towards (Angle from Point[4] to Point[1]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 2 for Neutral Passive at (Point[1] offset by ((Real((Integer A))) x ((Distance between Point[1] and Point[3]) / 36.00)) towards (Angle from Point[1] to Point[3]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 2 for Neutral Passive at (Point[3] offset by ((Real((Integer A))) x ((Distance between Point[3] and Point[5]) / 36.00)) towards (Angle from Point[3] to Point[5]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 2 for Neutral Passive at (Point[5] offset by ((Real((Integer A))) x ((Distance between Point[5] and Point[2]) / 36.00)) towards (Angle from Point[5] to Point[2]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Wait 0.01 seconds
- Unit - Create 1 Dummy 3 for Neutral Passive at (Point[1] offset by ((Real((Integer A))) x ((Distance between Point[1] and Point[2]) / 36.00)) towards (Angle from Point[1] to Point[2]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 3 for Neutral Passive at (Point[2] offset by ((Real((Integer A))) x ((Distance between Point[2] and Point[3]) / 36.00)) towards (Angle from Point[2] to Point[3]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 3 for Neutral Passive at (Point[3] offset by ((Real((Integer A))) x ((Distance between Point[3] and Point[4]) / 36.00)) towards (Angle from Point[3] to Point[4]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 3 for Neutral Passive at (Point[4] offset by ((Real((Integer A))) x ((Distance between Point[4] and Point[5]) / 36.00)) towards (Angle from Point[4] to Point[5]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 3 for Neutral Passive at (Point[5] offset by ((Real((Integer A))) x ((Distance between Point[5] and Point[1]) / 36.00)) towards (Angle from Point[5] to Point[1]) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 4 for Neutral Passive at (Point[1] offset by ((Real((Integer A))) x ((Distance between Point[1] and Location) / 36.00)) towards (Angle from Point[1] to Location) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 4 for Neutral Passive at (Point[2] offset by ((Real((Integer A))) x ((Distance between Point[2] and Location) / 36.00)) towards (Angle from Point[2] to Location) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 4 for Neutral Passive at (Point[3] offset by ((Real((Integer A))) x ((Distance between Point[3] and Location) / 36.00)) towards (Angle from Point[3] to Location) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 4 for Neutral Passive at (Point[4] offset by ((Real((Integer A))) x ((Distance between Point[4] and Location) / 36.00)) towards (Angle from Point[4] to Location) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
- Unit - Create 1 Dummy 4 for Neutral Passive at (Point[5] offset by ((Real((Integer A))) x ((Distance between Point[5] and Location) / 36.00)) towards (Angle from Point[5] to Location) degrees) facing Location
- Unit Group - Add (Last created unit) to Unit_Group
-
Loop - Actions
- Wait 1.40 seconds
-
Unit Group - Pick every unit in Unit_Group and do (Actions)
-
Loop - Actions
- Unit - Kill (Picked unit)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_Point[1])
- Custom script: call RemoveLocation(udg_Point[2])
- Custom script: call RemoveLocation(udg_Point[3])
- Custom script: call RemoveLocation(udg_Point[4])
- Custom script: call RemoveLocation(udg_Point[5])
- Custom script: call DestroyGroup(udg_Unit_Group)
-
Events
Sincerely,
MasterTrainer