I'm making a point-targeted spell that fires a missile at the target point and damages the first unit it encounters.
The problem is that the missle doesn't travel exactly straight. I think I could leave it as it is if the problem is too difficult to solve, but I'd really like to have it move perfectly straight.
Currently, the missile moves in a sort of winding pattern (think slithering snake). The winding starts out almost unnoticeable, but gets quite noticeable nearing the end range of the spell (1000 range).
If someone could tell me how to post an image of the trigger that would be great, but for now I'm going to just type it out (there are two triggers used):
Summer Red Cast (Trigger)
The problem is that the missle doesn't travel exactly straight. I think I could leave it as it is if the problem is too difficult to solve, but I'd really like to have it move perfectly straight.
Currently, the missile moves in a sort of winding pattern (think slithering snake). The winding starts out almost unnoticeable, but gets quite noticeable nearing the end range of the spell (1000 range).
If someone could tell me how to post an image of the trigger that would be great, but for now I'm going to just type it out (there are two triggers used):
Summer Red Cast (Trigger)
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Summer Red (Patchouli)
- Actions
- Set SummerRedCaster = (Casting unit)
- Set SummerRedCastPoint = (Position of SummerRedCaster)
- Set SummerRedTargetPoint = (Target point of ability being cast)
- Set SummerRedLevel = (Level of Summer Red (Patchouli) for SummerRedCaster)
- Unit - Make SummerRedCaster face SummerRedTargetPoint over 0.00 seconds
- Unit - Create 1 Projectile (Summer Red) for (Owner of SummerRedCaster) at SummerRedCastPoint facing SummerRedTargetPoint
- Set SummerRedProjectile = (Last created unit)
- Unit - Make SummerRedProjectile face SummerRedTargetPoint over 0.00 seconds
- Unit - Turn collision for SummerRedCaster Off
- Set SummerRedDistance = 0.00
- Set SummerRedMaxDistance = 1500
- Trigger - Turn on Summer Red Projectile <gen>
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- Actions
- Set SummerRedDistance = (SummerRedDistance + 15.00)
-
Unit Group - Pick every unit in (Units within 75.00 of (Position of SummerRedProjectile)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of SummerRedCaster)) Equal to True
-
Then - Actions
- Unit - Cause SummerRedCaster to damage (Picked unit), dealing (66.66 x (Real(SummerRedLevel))) damage of attack type Spells and damage type Normal
- Unit - Order SummerRedProjectile to Human Mountain King - Thunder Clap
- Unit - Kill SummerRedProjectile
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer(SummerRedDistance)) Greater than or equal to SummerRedMaxDistance
-
Then - Actions
- Unit - Order SummerRedProjectile to Human Mountain King - Thunder Clap
- Unit - Kill SummerRedProjectile
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Unit - Move SummerRedProjectile instantly to (SummerRedCastPoint offset by SummerRedDistance towards (Facing of SummerRedProjectile) degrees), facing SummerRedTargetPoint
Last edited: