- Joined
- Apr 14, 2012
- Messages
- 2,901
The problem isn't really with the projectile system I used (Kingz' Projectile System) but how it totally does not cooperate with my spell.
The spell:
The spell has two phases. First it creates a circle of sfx upon casting, literally 0.03 seconds after the cast. Then, after 2 seconds, it (supposedly should) creates missiles in a circle (the same circle as in the first phase) and then launches those towards a target unit.
The problem:
The first phase checks out. The second phase is what boggles my mind. The missiles are created, but they head towards the same corner of the map every time the spell is cast, and after a delay, one super dense missile falls out of the sky and that missile is what hits the target unit. Damage is delivered and it seems to follow the <time to reach> variable.
What I've tried:
I've tried applying the second phase of the spell to the original system map; it works there. I've also tried replacing the part of my spell which uses the projectile system with a completely simple one, which was to create a footman circle instead of the missiles: this also works normally.
Things only go awry when I use the projectile system. I am running out of troubleshooting ideas. Nay, I'm running out of spirit. I would really appreciate some help.
P.S. Sorry that the spell's name has nothing to do with the spell's mechanics. I realized too late.
The spell:
The spell has two phases. First it creates a circle of sfx upon casting, literally 0.03 seconds after the cast. Then, after 2 seconds, it (supposedly should) creates missiles in a circle (the same circle as in the first phase) and then launches those towards a target unit.
The problem:
The first phase checks out. The second phase is what boggles my mind. The missiles are created, but they head towards the same corner of the map every time the spell is cast, and after a delay, one super dense missile falls out of the sky and that missile is what hits the target unit. Damage is delivered and it seems to follow the <time to reach> variable.
What I've tried:
I've tried applying the second phase of the spell to the original system map; it works there. I've also tried replacing the part of my spell which uses the projectile system with a completely simple one, which was to create a footman circle instead of the missiles: this also works normally.
Things only go awry when I use the projectile system. I am running out of troubleshooting ideas. Nay, I'm running out of spirit. I would really appreciate some help.
-
Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set FslashAbil = Fireslash
-
Set FslashTempInt = 0
-
-
-
Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to FslashAbil
-
-
Then - Actions
-
Set FslashMaxIndex = (FslashMaxIndex + 1)
-
Set FslashCaster[FslashMaxIndex] = (Triggering unit)
-
Set FslashCasterPoint[FslashMaxIndex] = (Position of FslashCaster[FslashMaxIndex])
-
Set FslashTarget[FslashMaxIndex] = (Target unit of ability being cast)
-
Set FslashTargetPoint[FslashMaxIndex] = (Position of FslashTarget[FslashMaxIndex])
-
Set FslashPlayer[FslashMaxIndex] = (Owner of FslashCaster[FslashMaxIndex])
-
Set FslashCounter[FslashMaxIndex] = 0
-
Set FslashTempInt = 0
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FslashMaxIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Loop <gen>
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer FslashCurrentIndex) from 1 to FslashMaxIndex, do (Actions)
-
Loop - Actions
-
Set FslashCounter[FslashCurrentIndex] = (FslashCounter[FslashCurrentIndex] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FslashCounter[FslashCurrentIndex] Equal to 1
-
-
Then - Actions
-
-------- First, instantly create the circle of sfx --------
-
For each (Integer FslashTempInt) from 1 to 8, do (Actions)
-
Loop - Actions
-
-------- This part works --------
-
Set FslashTempPoint = (FslashCasterPoint[FslashCurrentIndex] offset by 400.00 towards ((Real(FslashTempInt)) x (360.00 / 8.00)) degrees)
-
Special Effect - Create a special effect at FslashTempPoint using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_FslashTempPoint)
-
-
-
-
Else - Actions
-
-------- Next, when two seconds are up, create fireballs at those points and aim towards target --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FslashCounter[FslashCurrentIndex] Equal to 66
-
-
Then - Actions
-
-------- Creating the projectiles in the circle --------
-
For each (Integer FslashTempInt) from 1 to 8, do (Actions)
-
Loop - Actions
-
-------- After the point has been determined, create a projectile and set it towards target --------
-
-------- Start Projectile System --------
-
Set MS_dmg_source = FslashCaster[FslashCurrentIndex]
-
Set MS_owner = FslashPlayer[FslashCurrentIndex]
-
Set MS_create_point = (FslashCasterPoint[FslashCurrentIndex] offset by 400.00 towards ((Real(FslashTempInt)) x (360.00 / 8.00)) degrees)
-
Set MS_target_point = FslashTargetPoint[FslashCurrentIndex]
-
Set MS_damage = 10.00
-
Set MS_seconds_to_reach = 3.00
-
Set MS_angle = (Angle from MS_create_point to MS_target_point)
-
Set MS_distance = (Distance between MS_create_point and MS_target_point)
-
Set MS_missile_gfx = Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
-
Set MS_impact_gfx = Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
-
Set MS_unit_hit_eff = Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
-
Set MS_arcs = True
-
Set MS_arc_dist = 300.00
-
Set MS_parabola = True
-
Set MS_arc_type = FslashTempInt
-
Set MS_parabola_height = 450.00
-
Trigger - Run MS init <gen> (ignoring conditions)
-
Custom script: call RemoveLocation(udg_MS_create_point)
-
Custom script: call RemoveLocation(udg_MS_target_point)
-
-------- End --------
-
Custom script: call RemoveLocation(udg_FslashTempPoint)
-
-
-
-------- Recycling --------
-
Set FslashCounter[FslashCurrentIndex] = FslashCounter[FslashMaxIndex]
-
Set FslashCaster[FslashCurrentIndex] = FslashCaster[FslashMaxIndex]
-
Set FslashCasterPoint[FslashCurrentIndex] = FslashCasterPoint[FslashMaxIndex]
-
Set FslashPlayer[FslashCurrentIndex] = FslashPlayer[FslashMaxIndex]
-
Set FslashTarget[FslashCurrentIndex] = FslashTarget[FslashMaxIndex]
-
Set FslashTargetPoint[FslashCurrentIndex] = FslashTargetPoint[FslashMaxIndex]
-
Set FslashTargetPoint[FslashCurrentIndex] = FslashTargetPoint[FslashMaxIndex]
-
Set FslashMaxIndex = (FslashMaxIndex - 1)
-
Set FslashCurrentIndex = (FslashCurrentIndex - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FslashMaxIndex Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
-
-