Bogrim
y hello thar
- Reaction score
- 154
This isn't the first time I've encountered this problem. I use game text messages to track how far the loop goes. In this game, the loop seems to stop at random times which ruins the spell itself.
Can someone enlighten me what holy law of loops I have broken? ;(
Trigger:
- Ability Earthquake begin
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Earthquake ()
- Actions
- Custom script: local location l = GetSpellTargetLoc()
- Custom script: local unit u = GetSpellAbilityUnit()
- Custom script: set udg_temp_location[0] = l
- Environment - Create a 22.00 second Normal ripple deformation at temp_location[0] with starting radius 300.00, ending radius 300.00, and depth 40.00, using 1.00 second ripples spaced 150.00 apart
- Game - Display to (All players) the text: trigger
- For each (Integer A) from 1 to 20, do (Actions)
- Loop - Actions
- Wait 1.00 seconds
- Custom script: set udg_temp_location[0] = l
- Custom script: set udg_temp_unit = u
- Set temp_group = (Units within 300.00 of temp_location[0] matching ((((Matching unit) belongs to an enemy of (Owner of temp_unit)) Equal to True) and (((Matching unit) is alive) Equal to True)))
- Game - Display to (All players) the text: ((String((Integer A))) + loop)
- Unit Group - Pick every unit in temp_group and do (Actions)
- Loop - Actions
- Unit - Cause temp_unit to damage (Picked unit), dealing ((Real((Integer A))) x 10.00) damage of attack type Spells and damage type Normal
- Set temp_location[1] = (Position of (Picked unit))
- Special Effect - Create a special effect at temp_location[1] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
- Custom script: call RemoveLocation(udg_temp_location[1])
- Set temp_effect = (Last created special effect)
- Trigger - Run Destroy Special Effect <gen> (ignoring conditions)
- Loop - Actions
- Loop - Actions
- Custom script: call RemoveLocation(l)
- Events
Can someone enlighten me what holy law of loops I have broken? ;(