- Joined
- Feb 27, 2007
- Messages
- 5,594
There are a bunch of erroneous [B]..[/B] in your trigger tags, and all of the trigger text is actually in bold. You should fix that, it looks weird.
DPF Start

Events


Game - DamageModifierEvent becomes Equal to 1.00

Conditions


Or - Any (Conditions) are true



Conditions




(Unit-type of DamageEventTarget) Equal to DPS Dummy




(Unit-type of DamageEventTarget) Equal to Rifleman


(DamageEventTarget is in DPF_TargetGroup) Equal to False

Actions


Set DPF_IndexSingle = (DPF_IndexSingle + 1)


Set DPF_TargetSingle[DPF_IndexSingle] = DamageEventTarget


-------- Change (OR) Condition Above --------


Unit Group - Add DamageEventTarget to DPF_TargetGroup


Set DPF_TargetPoint = (Position of DamageEventTarget)


-------- Range can be changed --------


Set DPF_Range = 600.00


Set DPF_Group[(Custom value of DamageEventTarget)] = (Units within DPF_Range of DPF_TargetPoint matching (((Matching unit) belongs to an enemy of (Owner of DamageEventTarget)) Equal to True))


Set DPF_TargetHealth[(Custom value of DamageEventTarget)] = (Life of DamageEventTarget)


Custom script: call RemoveLocation(udg_DPF_TargetPoint)


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



If - Conditions




DPF_IndexSingle Equal to 1



Then - Actions




Trigger - Turn on DPF Damage <gen>




Trigger - Turn on DPF CheckEnd <gen>



Else - Actions
DPF Damage

Events


Game - AfterDamageEvent becomes Equal to 1.00

Conditions


(DamageEventTarget is in DPF_TargetGroup) Equal to True


(DamageEventTarget is in DPF_DamageGroup[(Custom value of DamageEventTarget)]) Equal to False

Actions


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



If - Conditions




(DamageEventTarget is alive) Equal to True



Then - Actions




Set DPF_TargetHealth[(Custom value of DamageEventTarget)] = (Life of DamageEventTarget)




Set DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] = (DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] + DamageEventAmount)




Set DPF_TotalDamage[(Custom value of DamageEventTarget)] = (DPF_TotalDamage[(Custom value of DamageEventTarget)] + DamageEventAmount)



Else - Actions




Set DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] = (DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] + DPF_TargetHealth[(Custom value of DamageEventTarget)])




Set DPF_TotalDamage[(Custom value of DamageEventTarget)] = (DPF_TotalDamage[(Custom value of DamageEventTarget)] + DPF_TargetHealth[(Custom value of DamageEventTarget)])
DPF CheckEnd

Events


Time - Every 0.20 seconds of game time

Conditions

Actions


For each (Integer DPF_LoopSingle) from 1 to DPF_IndexSingle, do (Actions)



Loop - Actions




Set DPF_Range = 1000.00




Set DPF_TargetPoint = (Position of DPF_TargetSingle[DPF_LoopSingle])




Set DPF_AllyGroup = (Units within DPF_Range of DPF_TargetPoint matching ((((Matching unit) belongs to an enemy of (Owner of DPF_TargetSingle[DPF_LoopSingle])) Equal to True) and (((Matching unit) is alive) Equal to True)))




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





Loop - Actions






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







If - Conditions








((Picked unit) is in DPF_Group[(Custom value of DPF_TargetSingle[DPF_LoopSingle])]) Equal to False







Then - Actions








Unit Group - Add (Picked unit) to DPF_Group[(Custom value of DPF_TargetSingle[DPF_LoopSingle])]







Else - Actions




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





If - Conditions






Or - Any (Conditions) are true







Conditions








(Number of units in DPF_AllyGroup) Equal to 0








(DPF_TargetSingle[DPF_LoopSingle] is alive) Equal to False





Then - Actions






Unit Group - Remove DPF_TargetSingle[DPF_LoopSingle] from DPF_TargetGroup






Unit Group - Pick every unit in DPF_Group[(Custom value of DPF_TargetSingle[DPF_LoopSingle])] and do (Actions)







Loop - Actions








Set DPF_Index = (DPF_Index + 1)








Set DPF_UnitDPS[DPF_Index] = 0.00








Set DPF_Player[DPF_Index] = (Owner of (Picked unit))








Set DPF_UnitDPS[DPF_Index] = ((DPF_UnitDamage[(Player number of (Owner of (Picked unit)))] / DPF_TotalDamage[(Custom value of DPF_TargetSingle[DPF_LoopSingle])]) x 100.00)








Set DPF_DamageInteger[DPF_Index] = (Integer(DPF_UnitDamage[(Player number of (Owner of (Picked unit)))]))








Set DPF_UnitDamage[(Player number of (Owner of (Picked unit)))] = 0.00








Player Group - Add DPF_Player[DPF_Index] to DPF_PlayerGroup






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: (-------------------- + ((Total Damage : + (String((Integer(DPF_TotalDamage[(Custom value of DPF_TargetSingle[DPF_LoopSingle])]))))) + --------------------))






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: ...






For each (Integer DPF_Loop) from 1 to DPF_Index, do (Actions)







Loop - Actions








Game - Display to DPF_PlayerGroup for 120.00 seconds the text: ((( + (Name of DPF_Player[DPF_Loop])) + -- ) + (((String(DPF_DamageInteger[DPF_Loop])) + ) + ((String(DPF_UnitDPS[DPF_Loop])) + %)))






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: ...






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: -------------------...






For each (Integer DPF_Loop) from 1 to DPF_Index, do (Actions)







Loop - Actions








Unit Group - Pick every unit in DPF_Group[(Custom value of DPF_TargetSingle[DPF_LoopSingle])] and do (Actions)









Loop - Actions










Set DPF_DamageInteger[DPF_Loop] = 0








Player Group - Remove DPF_Player[DPF_Loop] from DPF_PlayerGroup






Custom script: call DestroyGroup(udg_DPF_Group[GetUnitUserData(udg_DPF_TargetSingle[udg_DPF_LoopSingle])])






Set DPF_TotalDamage[(Custom value of DPF_TargetSingle[DPF_LoopSingle])] = 0.00






Set DPF_TargetSingle[DPF_LoopSingle] = DPF_TargetSingle[DPF_LoopSingle]






Set DPF_IndexSingle = (DPF_IndexSingle - 1)






Set DPF_Index = 0






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







If - Conditions








DPF_IndexSingle Equal to 0







Then - Actions








Trigger - Turn off DPF Damage <gen>








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions




Custom script: call RemoveLocation(udg_DPF_TargetPoint)




Custom script: call DestroyGroup(udg_DPF_AllyGroup)
DPF Start Area

Events


Game - DamageModifierEvent becomes Equal to 1.00

Conditions


Or - Any (Conditions) are true



Conditions




(Unit-type of DamageEventTarget) Equal to DPS Dummy




(Unit-type of DamageEventTarget) Equal to Rifleman


(DamageEventTarget is in DPF_TargetGroup) Equal to False

Actions


-------- Change (OR) Condition Above --------


Unit Group - Add DamageEventTarget to DPF_TargetGroup


Set DPF_IndexArea = (DPF_IndexArea + 1)


Set DPF_TargetArea[DPF_IndexArea] = DamageEventTarget


-------- ----------------------- --------


-------- Range can be changed --------


Set DPF_Range = 1200.00


Set DPF_TargetPoint = (Position of DamageEventTarget)


Set DPF_Group[(Custom value of DamageEventTarget)] = (Units within DPF_Range of DPF_TargetPoint matching (((Matching unit) belongs to an enemy of (Owner of DamageEventTarget)) Equal to True))


Set DPF_DamageGroup[(Custom value of DamageEventTarget)] = (Units owned by (Owner of DamageEventTarget) matching ((Matching unit) Equal to DamageEventTarget))


Custom script: call RemoveLocation(udg_DPF_TargetPoint)


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



If - Conditions




DPF_IndexArea Equal to 1



Then - Actions




Trigger - Turn on DPF Target Health <gen>




Trigger - Turn on DPF Damage Area <gen>




Trigger - Turn on DPF CheckEnd Area <gen>



Else - Actions
DPF Target Health

Events


Game - DamageModifierEvent becomes Equal to 1.00

Conditions

Actions


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



Loop - Actions




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





If - Conditions






(DamageEventTarget is in DPF_DamageGroup[(Custom value of (Picked unit))]) Equal to True





Then - Actions






Set DPF_TargetHealthArea[(Custom value of DamageEventTarget)] = (Life of DamageEventTarget)





Else - Actions
DPF Damage Area

Events


Game - AfterDamageEvent becomes Equal to 1.00

Conditions

Actions


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



Loop - Actions




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





If - Conditions






(DamageEventTarget is in DPF_DamageGroup[(Custom value of (Picked unit))]) Equal to True





Then - Actions






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







If - Conditions








(DamageEventTarget is alive) Equal to False







Then - Actions








Set DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] = (DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] + DPF_TargetHealthArea[(Custom value of DamageEventTarget)])








Set DPF_TotalDamage[(Custom value of (Picked unit))] = (DPF_TotalDamage[(Custom value of (Picked unit))] + DPF_TargetHealthArea[(Custom value of DamageEventTarget)])







Else - Actions








Set DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] = (DPF_UnitDamage[(Player number of (Owner of DamageEventSource))] + DamageEventAmount)








Set DPF_TotalDamage[(Custom value of (Picked unit))] = (DPF_TotalDamage[(Custom value of (Picked unit))] + DamageEventAmount)





Else - Actions
DPF CheckEnd Area

Events


Time - Every 0.20 seconds of game time

Conditions

Actions


For each (Integer DPF_LoopArea) from 1 to DPF_IndexArea, do (Actions)



Loop - Actions




Set DPF_Range = 1200.00




Set DPF_TargetPoint = (Position of DPF_TargetArea[DPF_LoopArea])




Set DPF_EnemyGroup = (Units within DPF_Range of DPF_TargetPoint matching ((((Matching unit) belongs to an ally of (Owner of DPF_TargetArea[DPF_LoopArea])) Equal to True) and (((Matching unit) is alive) Equal to True)))




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





Loop - Actions






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







If - Conditions








((Picked unit) is in DPF_DamageGroup[(Custom value of DPF_TargetArea[DPF_LoopArea])]) Equal to False







Then - Actions








Unit Group - Add (Picked unit) to DPF_DamageGroup[(Custom value of DPF_TargetArea[DPF_LoopArea])]







Else - Actions




Set DPF_AllyGroup = (Units within DPF_Range of DPF_TargetPoint matching ((((Matching unit) belongs to an enemy of (Owner of DPF_TargetArea[DPF_LoopArea])) Equal to True) and (((Matching unit) is alive) Equal to True)))




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





Loop - Actions






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







If - Conditions








((Picked unit) is in DPF_Group[(Custom value of DPF_TargetArea[DPF_LoopArea])]) Equal to False







Then - Actions








Unit Group - Add (Picked unit) to DPF_Group[(Custom value of DPF_TargetArea[DPF_LoopArea])]







Else - Actions




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





If - Conditions






Or - Any (Conditions) are true







Conditions








(Number of units in DPF_AllyGroup) Equal to 0








(DPF_TargetArea[DPF_LoopArea] is alive) Equal to False





Then - Actions






Unit Group - Remove DPF_TargetArea[DPF_LoopArea] from DPF_TargetGroup






Unit Group - Pick every unit in DPF_Group[(Custom value of DPF_TargetArea[DPF_LoopArea])] and do (Actions)







Loop - Actions








Set DPF_Index = (DPF_Index + 1)








Set DPF_UnitDPS[DPF_Index] = 0.00








Set DPF_Player[DPF_Index] = (Owner of (Picked unit))








Set DPF_UnitDPS[DPF_Index] = ((DPF_UnitDamage[(Player number of (Owner of (Picked unit)))] / DPF_TotalDamage[(Custom value of DPF_TargetArea[DPF_LoopArea])]) x 100.00)








Set DPF_DamageInteger[DPF_Index] = (Integer(DPF_UnitDamage[(Player number of (Owner of (Picked unit)))]))








Set DPF_UnitDamage[(Player number of (Owner of (Picked unit)))] = 0.00








Player Group - Add DPF_Player[DPF_Index] to DPF_PlayerGroup






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: (-------------------- + ((Total Damage : + (String((Integer(DPF_TotalDamage[(Custom value of DPF_TargetArea[DPF_LoopArea])]))))) + --------------------))






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: ...






For each (Integer DPF_Loop) from 1 to DPF_Index, do (Actions)







Loop - Actions








Game - Display to DPF_PlayerGroup for 120.00 seconds the text: ((( + (Name of DPF_Player[DPF_Loop])) + -- ) + (((String(DPF_DamageInteger[DPF_Loop])) + ) + ((String(DPF_UnitDPS[DPF_Loop])) + %)))






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: ...






Game - Display to DPF_PlayerGroup for 120.00 seconds the text: -------------------...






For each (Integer DPF_Loop) from 1 to DPF_Index, do (Actions)







Loop - Actions








Unit Group - Pick every unit in DPF_Group[(Custom value of DPF_TargetArea[DPF_LoopArea])] and do (Actions)









Loop - Actions










Set DPF_DamageInteger[DPF_Loop] = 0








Player Group - Remove DPF_Player[DPF_Loop] from DPF_PlayerGroup






Custom script: call DestroyGroup(udg_DPF_Group[GetUnitUserData(udg_DPF_TargetArea[udg_DPF_LoopArea])])






Custom script: call DestroyGroup(udg_DPF_DamageGroup[GetUnitUserData(udg_DPF_TargetArea[udg_DPF_LoopArea])])






Set DPF_TotalDamage[(Custom value of DPF_TargetArea[DPF_LoopArea])] = 0.00






Set DPF_Index = 0






Set DPF_TargetArea[DPF_LoopArea] = DPF_TargetArea[DPF_IndexArea]






Set DPF_IndexArea = (DPF_IndexArea - 1)






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







If - Conditions








DPF_IndexArea Equal to 0







Then - Actions








Trigger - Turn off DPF Target Health <gen>








Trigger - Turn off DPF Damage Area <gen>








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions




Custom script: call RemoveLocation(udg_DPF_TargetPoint)




Custom script: call DestroyGroup(udg_DPF_AllyGroup)




Custom script: call DestroyGroup(udg_DPF_EnemyGroup)