- Joined
- May 11, 2012
- Messages
- 2,103
Here I have triggers for spells I made.
Storm Hammer: Recently, I noticed that this spell doesn't works at first cast, but on second and after it does it's job. I need to know wht causes it to malfunction for first time.
Fissure: This spell works correctly, but as long as there are no unit in between the line. If there is any unit between the line, that part stays empty, the dummy fissure (Model) is not created. This one I really can't figure out
Please respond fast and thank you for taking time to help me
Storm Hammer: Recently, I noticed that this spell doesn't works at first cast, but on second and after it does it's job. I need to know wht causes it to malfunction for first time.
-
Storm Hammer Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Storm Hammer
-
Actions
- -------- --------------- Set Variables --------------- --------
- Set MaxIndexStormHammer = (MaxIndexStormHammer + 1)
- Set StormHammer_TrigUnit[MaxIndexStormHammer] = (Triggering unit)
- Set StormHammer_TargetUnit[MaxIndexStormHammer] = (Target unit of ability being cast)
- Set TempPoint = (Position of StormHammer_TrigUnit[MaxIndexStormHammer])
- Set TempPoint2 = (Position of StormHammer_TargetUnit[MaxIndexStormHammer])
- -------- --------------- Actions --------------- --------
- Unit - Create 1 Dummy Storm Hammer for (Owner of StormHammer_TrigUnit[MaxIndexStormHammer]) at TempPoint facing TempPoint2
- Set StormHammer_Dummy[MaxIndexStormHammer] = (Last created unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MaxIndexStormHammer Equal to 1
-
Then - Actions
- Trigger - Turn on Storm Hammer Loop <gen>
- Else - Actions
-
If - Conditions
- -------- --------------- Clear Leaks --------------- --------
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Custom script: set udg_TempPoint = null
- Custom script: set udg_TempPoint2 = null
-
Events
-
Storm Hammer Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- -------- --------------- Actions --------------- --------
-
For each (Integer TempInt) from 1 to MaxIndexStormHammer, do (Actions)
-
Loop - Actions
- -------- --------------- Set Variables --------------- --------
- Set TempPoint = (Position of StormHammer_Dummy[TempInt])
- Set TempPoint2 = (Position of StormHammer_TargetUnit[TempInt])
- -------- --------------- Actions --------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between TempPoint and TempPoint2) Less than or equal to 75.00
-
Then - Actions
- -------- --------------- Actions --------------- --------
- Unit - Kill StormHammer_Dummy[TempInt]
- -------- --------------- Set Variables --------------- --------
- Set TempUnitGroup = (Units within 350.00 of TempPoint2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of StormHammer_TrigUnit[TempInt])) Equal to True))))
- -------- --------------- Actions --------------- --------
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Create 1 Dummy Caster for (Owner of StormHammer_TrigUnit[TempInt]) at TempPoint2 facing (Facing of (Picked unit)) degrees
- Set TempDummyUnit[1] = (Last created unit)
- Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit[1]
- Unit - Add Dummy Storm Hammer to TempDummyUnit[1]
- Unit - Set level of Dummy Storm Hammer for TempDummyUnit[1] to (Level of Storm Hammer for StormHammer_TrigUnit[TempInt])
- Unit - Order TempDummyUnit[1] to Human Mountain King - Storm Bolt (Picked unit)
-
Loop - Actions
- -------- --------------- Clear Leaks --------------- --------
- Custom script: call DestroyGroup(udg_TempUnitGroup)
- Custom script: set udg_TempUnitGroup = null
- -------- --------------- Set Variables --------------- --------
- Set StormHammer_TrigUnit[TempInt] = StormHammer_TrigUnit[MaxIndexStormHammer]
- Set StormHammer_TargetUnit[TempInt] = StormHammer_TargetUnit[MaxIndexStormHammer]
- Set StormHammer_Dummy[TempInt] = StormHammer_Dummy[MaxIndexStormHammer]
- Set StormHammer_TrigUnit[MaxIndexStormHammer] = No unit
- Set StormHammer_TargetUnit[MaxIndexStormHammer] = No unit
- Set StormHammer_Dummy[MaxIndexStormHammer] = No unit
- Set MaxIndexStormHammer = (MaxIndexStormHammer - 1)
- Set TempInt = (TempInt - 1)
-
Else - Actions
- -------- --------------- Set Variables --------------- --------
- Set TempPoint3 = (TempPoint offset by 25.00 towards (Angle from TempPoint to TempPoint2) degrees)
- -------- --------------- Actions --------------- --------
- Unit - Move StormHammer_Dummy[TempInt] instantly to TempPoint3, facing TempPoint2
- -------- --------------- Clear Leaks --------------- --------
- Custom script: call RemoveLocation(udg_TempPoint3)
- Custom script: set udg_TempPoint3 = null
-
If - Conditions
- -------- --------------- Clear Leaks --------------- --------
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Custom script: set udg_TempPoint = null
- Custom script: set udg_TempPoint2 = null
-
Loop - Actions
- -------- --------------- Actions --------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MaxIndexStormHammer Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Events
-
Fissure
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Fissure
-
Actions
- -------- --------------- Set Variables --------------- --------
- Set TrigUnit = (Triggering unit)
- Set TempPoint = (Position of TrigUnit)
- Set TempPoint2 = (Target point of ability being cast)
- Set TempReal = (Angle from TempPoint to TempPoint2)
- Set TempDamage[1] = 300.00
- Set TempDamage[2] = 600.00
- Set TempDamage[3] = 1200.00
- Set TempDamage[4] = 2400.00
- Set TempDamage[5] = 4800.00
- Set TempInt = (Level of Fissure for TrigUnit)
- -------- --------------- Actions --------------- --------
-
For each (Integer TempInt) from 1 to 12, do (Actions)
-
Loop - Actions
- -------- --------------- Set Variables --------------- --------
- Set TempPoint3 = (TempPoint offset by (100.00 x (Real(TempInt))) towards TempReal degrees)
- Set TempUnitGroup = (Units within 200.00 of TempPoint3 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of TrigUnit)) Equal to True))))
- -------- --------------- Actions --------------- --------
- Special Effect - Create a special effect at TempPoint3 using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Create 1 Dummy Fissure for (Owner of TrigUnit) at TempPoint3 facing TempReal degrees
- Unit - Turn collision for (Last created unit) Off
- Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
- Unit - Create 1 Dummy Fissure Collision for (Owner of TrigUnit) at TempPoint3 facing TempReal degrees
- Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Cause TrigUnit to damage (Picked unit), dealing TempDamage[TempInt] damage of attack type Spells and damage type Universal
- Unit - Create 1 Dummy Caster for (Owner of TrigUnit) at TempPoint3 facing 0.00 degrees
- Set TempDummyUnit[1] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to TempDummyUnit[1]
- Unit - Add Dummy Fissure Stun to TempDummyUnit[1]
- Unit - Set level of Dummy Fissure Stun for TempDummyUnit[1] to (Level of Fissure for TrigUnit)
- Unit - Order TempDummyUnit[1] to Neutral - Firebolt (Picked unit)
-
Loop - Actions
- -------- --------------- Clear Leaks --------------- --------
- Custom script: call RemoveLocation (udg_TempPoint3)
- Custom script: call DestroyGroup (udg_TempUnitGroup)
- Custom script: set udg_TempPoint3 = null
- Custom script: set udg_TempUnitGroup = null
-
Loop - Actions
- -------- --------------- Clear Leaks --------------- --------
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- Custom script: set udg_TempPoint = null
- Custom script: set udg_TempPoint2 = null
-
Events