# [Trigger][GUI/MUI] Damage Problem

Status
Not open for further replies.

#### Chuchulain

Level 1
i'm making a spell that dealt a damage like shockwave using arrow but there's something wrong with my trigger ... it supposed to deal damage once but it never stops dealing damage whenever the unit close to the arrows ... here's the trigger ...

• Arrow Shower Movement
• Events
• Time - Every 0.03 seconds of game time
• Conditions
• Actions
• For each (Integer ArrowShower_Loop[2]) from 1 to ArrowShower_Counts, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ArrowShower_On[ArrowShower_Loop[2]] Equal to True
• Then - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (ArrowShower_Dummy[ArrowShower_Loop[2]] is alive) Equal to True
• Then - Actions
• Set ArrowShower_Point[1] = (Position of ArrowShower_Dummy[ArrowShower_Loop[2]])
• Set ArrowShower_Point[2] = (ArrowShower_Point[1] offset by 27.00 towards (Facing of ArrowShower_Dummy[ArrowShower_Loop[2]]) degrees)
• Unit - Move ArrowShower_Dummy[ArrowShower_Loop[2]] instantly to ArrowShower_Point[2]
• Set ArrowShower_Distance[ArrowShower_Loop[2]] = (ArrowShower_Distance[ArrowShower_Loop[2]] + 27.00)
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ArrowShower_Distance[ArrowShower_Loop[2]] Greater than or equal to ArrowShower_DistanceMax[ArrowShower_Loop[2]]
• Then - Actions
• Unit Group - Remove all units of ArrowShower_EnemyGroup[ArrowShower_Loop[2]] from ArrowShower_EnemyGroup[ArrowShower_Loop[2]]
• Unit - Kill ArrowShower_Dummy[ArrowShower_Loop[2]]
• Else - Actions
• Custom script: set bj_wantDestroyGroup = true
• Unit Group - Pick every unit in (Units within 75.00 of ArrowShower_Point[1] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is Ethereal) Not equal to True) and ((((Matching unit) is alive) Equal t and do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ((Picked unit) is in ArrowShower_EnemyGroup[ArrowShower_Loop[2]]) Not equal to True
• Then - Actions
• Unit Group - Add (Picked unit) to ArrowShower_EnemyGroup[ArrowShower_Loop[2]]
• Unit - Cause ArrowShower_Caster[ArrowShower_Loop[2]] to damage (Picked unit), dealing 25.00 damage of attack type Chaos and damage type Universal
• Else - Actions
• Custom script: call RemoveLocation (udg_ArrowShower_Point[1])
• Custom script: call RemoveLocation (udg_ArrowShower_Point[2])
• Else - Actions
• Set ArrowShower_Int = (ArrowShower_Int - 1)
• Set ArrowShower_On[ArrowShower_Loop[2]] = False
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ArrowShower_Int Equal to 0
• Then - Actions
• Game - Display to (All players) the text: off
• Set ArrowShower_Counts = 0
• Trigger - Turn off (This trigger)
• Else - Actions
• Else - Actions

#### Pharaoh_

Level 40
It looks like the group ArrowShower_EnemyGroup[ArrowShower_Loop[2]] is not recognized. Did you use
• Custom script: if udg_ArrowShower_EnemyGroup[udg_ArrowShower_Loop[2]] == null then
• Custom script: set udg_ArrowShower_EnemyGroup[udg_ArrowShower_Loop[2]] = CreateGroup()
• Custom script: endif
?

#### Chuchulain

Level 1
wooh .. it works ... thanks a lot man ...

Status
Not open for further replies.

Replies
4
Views
539
Replies
5
Views
908
Replies
12
Views
990
Replies
4
Views
787
Replies
2
Views
462