- Joined
- Jun 28, 2010
- Messages
- 110
My Triggers. There are 2 issues.
The first one:
In my Loop trigger
I tried to print out DebugMsg but it seems not to work correctly., if this trigger works:
The first one:
In my Loop trigger
-
Custom script: call DestroyGroup(udg_ArcticBlastDummyGroup[udg_ArcticBlastLoopIndex])
-
Custom script: call DestroyGroup(udg_ArcticBlastDamagedGroup[udg_ArcticBlastLoopIndex])
-
Custom script: set udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] = CreateGroup()
-
Custom script: set udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] = CreateGroup()
I tried to print out DebugMsg but it seems not to work correctly., if this trigger works:
-
Custom script: if udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] == null then
-
Custom script: set udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] = CreateGroup()
-
Game - Display to (All players) for 10.00 seconds the text: Group
-
Custom script: endif
-
Custom script: if udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] == null then
-
Custom script: set udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] = CreateGroup()
-
Game - Display to (All players) for 10.00 seconds the text: Group
-
Custom script: endif
-
Custom script: set udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] = CreateGroup()
-
Custom script: set udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] = CreateGroup()
-
Custom script: call DestroyGroup(udg_ArcticBlastDummyGroup[udg_ArcticBlastLoopIndex])
-
Custom script: call DestroyGroup(udg_ArcticBlastDamagedGroup[udg_ArcticBlastLoopIndex])
-
Arctic Blast Config
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- The ID of Main Abillity, in this case: "Arctic Blast" --------
-


Set ArcticBlast = Arctic Blast
-


-------- The ID of Arctic Blast's Slow --------
-


Set ArcticBlastSlow = Arctic Blast Slow
-


-------- The Effect upon being damaged by Arctic Blast --------
-


Set ArcticBlastDamageEffect = Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
-


-------- The Effect Attachment --------
-


Set ArcticBlastDamageAttach = origin
-


-------- Arctic Blast's Attack Type --------
-


Set ArcticBlastAttackType = Spells
-


-------- Arctic Blast's Damage Type --------
-


Set ArcticBlastDamageType = Universal
-


-------- The ID of Visual Dummy, which means "spreading out effect" --------
-


Set ArcticBlastVisualDummy = Arctic Blast Dummy
-


-------- The Amount of "Visual Dummy" will be created upon casting Arctic Blast --------
-


Set ArcticBlastEffectAmount[1] = 9
-


Set ArcticBlastEffectAmount[2] = 18
-


Set ArcticBlastEffectAmount[3] = 27
-


Set ArcticBlastEffectAmount[4] = 36
-


-------- The ID of Caster Dummy --------
-


Set ArcticBlastDummy = Dummy
-


-------- Arctic Blast's Damage --------
-


Set ArcticBlastDamage[1] = 100.00
-


Set ArcticBlastDamage[2] = 200.00
-


Set ArcticBlastDamage[3] = 300.00
-


Set ArcticBlastDamage[4] = 400.00
-


-------- Arctic Blast's Speed --------
-


Set ArcticBlastSpeed[1] = 400.00
-


Set ArcticBlastSpeed[2] = 450.00
-


Set ArcticBlastSpeed[3] = 500.00
-


Set ArcticBlastSpeed[4] = 550.00
-


-------- Arctic Blast's Maximum Distance --------
-


Set ArcticBlastMaxDistance[1] = 600.00
-


Set ArcticBlastMaxDistance[2] = 700.00
-


Set ArcticBlastMaxDistance[3] = 800.00
-


Set ArcticBlastMaxDistance[4] = 900.00
-


-------- Arctic Blast's Expand Tick --------
-


-------- This determine the actual speed per 0.03 seconds peroid of the spell --------
-


-------- In this case, it should be 0.03, Example: Level 1 has 400 Speed, it will be multiplied by 0.03 so the result is 12 range of distance for every 0.03 seconds => 400 per second --------
-


Set ArcticBlastSpreadOutTick = 0.03
-


-------- Arctic Blast Damage Radius --------
-


Set ArcticBlastRadius[1] = 100.00
-


Set ArcticBlastRadius[2] = 125.00
-


Set ArcticBlastRadius[3] = 150.00
-


Set ArcticBlastRadius[4] = 175.00
-
-
-
Arctic Blast
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to ArcticBlast
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




ArcticBlastIndex Equal to 0
-
-



Then - Actions
-




Trigger - Turn on Arctic Blast Expand <gen>
-
-



Else - Actions
-
-


Set ArcticBlastIndex = (ArcticBlastIndex + 1)
-


Custom script: if udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] == null then
-


Custom script: set udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] = CreateGroup()
-


Game - Display to (All players) for 10.00 seconds the text: Group
-


Custom script: endif
-


Custom script: if udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] == null then
-


Custom script: set udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] = CreateGroup()
-


Game - Display to (All players) for 10.00 seconds the text: Group
-


Custom script: endif
-


Set ArcticBlastCaster[ArcticBlastIndex] = (Triggering unit)
-


Set ArcticBlastLevel[ArcticBlastIndex] = (Level of ArcticBlast for ArcticBlastCaster[ArcticBlastIndex])
-


Set ArcticBlastEffectAmount[ArcticBlastIndex] = ArcticBlastEffectAmount[ArcticBlastLevel[ArcticBlastIndex]]
-


Set ArcticBlastMaxDistance[ArcticBlastIndex] = ArcticBlastMaxDistance[ArcticBlastLevel[ArcticBlastIndex]]
-


Set ArcticBlastDamage[ArcticBlastIndex] = ArcticBlastDamage[ArcticBlastLevel[ArcticBlastIndex]]
-


Set ArcticBlastSpeed[ArcticBlastIndex] = ArcticBlastSpeed[ArcticBlastLevel[ArcticBlastIndex]]
-


Set ArcticBlastRadius[ArcticBlastIndex] = ArcticBlastRadius[ArcticBlastLevel[ArcticBlastIndex]]
-


Set ArcticBlastSpreadOutSpeed[ArcticBlastIndex] = (ArcticBlastSpeed[ArcticBlastLevel[ArcticBlastIndex]] x ArcticBlastSpreadOutTick)
-


Set ArcticBlastTriggerPlayer[ArcticBlastIndex] = (Owner of ArcticBlastCaster[ArcticBlastIndex])
-


Set ArcticBlastDistance[ArcticBlastIndex] = 0.00
-


Set ArcticBlastPoint = (Position of ArcticBlastCaster[ArcticBlastIndex])
-


Set ArcticBlastReal = 0.00
-


Unit - Create 1 ArcticBlastDummy for ArcticBlastTriggerPlayer[ArcticBlastIndex] at ArcticBlastPoint facing ArcticBlastReal degrees
-


Set ArcticBlastDummySlowUnit[ArcticBlastIndex] = (Last created unit)
-


Unit - Add ArcticBlastSlow to ArcticBlastDummySlowUnit[ArcticBlastIndex]
-


Unit - Set level of ArcticBlastSlow for ArcticBlastDummySlowUnit[ArcticBlastIndex] to (Level of ArcticBlast for ArcticBlastCaster[ArcticBlastIndex])
-


For each (Integer ArcticBlastInteger) from 1 to ArcticBlastEffectAmount[ArcticBlastIndex], do (Actions)
-



Loop - Actions
-




Set ArcticBlastReal = (ArcticBlastReal + (360.00 / (Real(ArcticBlastEffectAmount[ArcticBlastIndex]))))
-




Set ArcticBlastOffset = (ArcticBlastPoint offset by ArcticBlastDistance[ArcticBlastIndex] towards ArcticBlastReal degrees)
-




Unit - Create 1 ArcticBlastVisualDummy for ArcticBlastTriggerPlayer[ArcticBlastIndex] at ArcticBlastOffset facing ArcticBlastReal degrees
-




Unit Group - Add (Last created unit) to ArcticBlastDummyGroup[ArcticBlastIndex]
-




Custom script: call RemoveLocation(udg_ArcticBlastOffset)
-
-
-


Custom script: call RemoveLocation(udg_ArcticBlastPoint)
-
-
-
Arctic Blast Expand
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer ArcticBlastLoopIndex) from 1 to ArcticBlastIndex, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






ArcticBlastDistance[ArcticBlastLoopIndex] Greater than or equal to ArcticBlastMaxDistance[ArcticBlastLoopIndex]
-
-





Then - Actions
-






Unit Group - Pick every unit in ArcticBlastDummyGroup[ArcticBlastLoopIndex] and do (Actions)
-







Loop - Actions
-








Unit - Kill (Picked unit)
-
-
-






-------- De-Index --------
-






-------- Removing Leaks --------
-






Unit - Remove ArcticBlastDummySlowUnit[ArcticBlastLoopIndex] from the game
-






Custom script: call DestroyGroup(udg_ArcticBlastDummyGroup[udg_ArcticBlastLoopIndex])
-






Custom script: call DestroyGroup(udg_ArcticBlastDamagedGroup[udg_ArcticBlastLoopIndex])
-






Set ArcticBlastCaster[ArcticBlastLoopIndex] = ArcticBlastCaster[ArcticBlastIndex]
-






Set ArcticBlastTriggerPlayer[ArcticBlastLoopIndex] = ArcticBlastTriggerPlayer[ArcticBlastIndex]
-






Set ArcticBlastLevel[ArcticBlastLoopIndex] = ArcticBlastLevel[ArcticBlastIndex]
-






Set ArcticBlastDummySlowUnit[ArcticBlastLoopIndex] = ArcticBlastDummySlowUnit[ArcticBlastIndex]
-






Set ArcticBlastDistance[ArcticBlastLoopIndex] = ArcticBlastDistance[ArcticBlastIndex]
-






Set ArcticBlastMaxDistance[ArcticBlastLoopIndex] = ArcticBlastMaxDistance[ArcticBlastIndex]
-






Set ArcticBlastDamage[ArcticBlastLoopIndex] = ArcticBlastDamage[ArcticBlastIndex]
-






Set ArcticBlastSpeed[ArcticBlastLoopIndex] = ArcticBlastSpeed[ArcticBlastIndex]
-






Set ArcticBlastRadius[ArcticBlastLoopIndex] = ArcticBlastRadius[ArcticBlastIndex]
-






Set ArcticBlastEffectAmount[ArcticBlastLoopIndex] = ArcticBlastEffectAmount[ArcticBlastIndex]
-






Set ArcticBlastSpreadOutSpeed[ArcticBlastLoopIndex] = ArcticBlastSpreadOutSpeed[ArcticBlastIndex]
-






Set ArcticBlastDummyGroup[ArcticBlastLoopIndex] = ArcticBlastDummyGroup[ArcticBlastIndex]
-






Set ArcticBlastDamagedGroup[ArcticBlastLoopIndex] = ArcticBlastDamagedGroup[ArcticBlastIndex]
-






Custom script: set udg_ArcticBlastDummyGroup[udg_ArcticBlastIndex] = CreateGroup()
-






Custom script: set udg_ArcticBlastDamagedGroup[udg_ArcticBlastIndex] = CreateGroup()
-






Set ArcticBlastLoopIndex = (ArcticBlastLoopIndex - 1)
-






Set ArcticBlastIndex = (ArcticBlastIndex - 1)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








ArcticBlastIndex Equal to 0
-
-







Then - Actions
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-





Else - Actions
-






Set ArcticBlastDistance[ArcticBlastLoopIndex] = (ArcticBlastDistance[ArcticBlastLoopIndex] + ArcticBlastSpreadOutSpeed[ArcticBlastLoopIndex])
-






Set ArcticBlastPoint = (Position of ArcticBlastCaster[ArcticBlastLoopIndex])
-






Unit Group - Pick every unit in ArcticBlastDummyGroup[ArcticBlastLoopIndex] and do (Actions)
-







Loop - Actions
-








Set ArcticBlastVisualDummyUnit = (Picked unit)
-








Set ArcticBlastReal = (Facing of ArcticBlastVisualDummyUnit)
-








Set ArcticBlastOffset = (ArcticBlastPoint offset by ArcticBlastDistance[ArcticBlastLoopIndex] towards ArcticBlastReal degrees)
-








Unit - Move ArcticBlastVisualDummyUnit instantly to ArcticBlastOffset
-








Set ArcticBlastGroup = (Units within ArcticBlastRadius[ArcticBlastLoopIndex] of ArcticBlastOffset)
-








Unit Group - Pick every unit in ArcticBlastGroup and do (Actions)
-









Loop - Actions
-










Set ArcticBlastDamagedUnit = (Picked unit)
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(ArcticBlastDamagedUnit is A structure) Equal to False
-












(ArcticBlastDamagedUnit is Magic Immune) Equal to False
-












(ArcticBlastDamagedUnit is alive) Equal to True
-












(ArcticBlastDamagedUnit belongs to an enemy of ArcticBlastTriggerPlayer[ArcticBlastLoopIndex]) Equal to True
-












(ArcticBlastDamagedUnit is in ArcticBlastDamagedGroup[ArcticBlastLoopIndex]) Equal to False
-
-











Then - Actions
-












-------- Since the picked is only damaged for 1 time in a loop, so its added to a unit group --------
-












-------- Damaging and Slow --------
-












Unit Group - Add ArcticBlastDamagedUnit to ArcticBlastDamagedGroup[ArcticBlastLoopIndex]
-












Unit - Cause ArcticBlastCaster[ArcticBlastLoopIndex] to damage ArcticBlastDamagedUnit, dealing ArcticBlastDamage[ArcticBlastLoopIndex] damage of attack type ArcticBlastAttackType and damage type ArcticBlastDamageType
-












Unit - Order ArcticBlastDummySlowUnit[ArcticBlastLoopIndex] to Human Sorceress - Slow ArcticBlastDamagedUnit
-












Special Effect - Create a special effect attached to the origin of ArcticBlastDamagedUnit using ArcticBlastDamageEffect
-












Special Effect - Destroy (Last created special effect)
-
-











Else - Actions
-
-
-
-








Custom script: call DestroyGroup(udg_ArcticBlastGroup)
-








Custom script: call RemoveLocation(udg_ArcticBlastOffset)
-
-
-






Custom script: call RemoveLocation(udg_ArcticBlastPoint)
-
-
-
-
-
-


