Moderator
M
Moderator
|
Moderator: Pharaoh_ Date: 18:59, 22nd Apr 2012
|
BPConfig

Events


Map initialization

Conditions

Actions


-------- You can set anything here --------


-------- Set the Attachment Point on the Target unit of Ability being cast --------


Set DummyEffect_AttachStr_OnCst = origin


-------- Set the Attachment Point on the sorrounding units at the break of the spell --------


Set DummyEffect_AttachStr_OnBrk = origin


-------- Set the model path used on the target unit --------


Set Dummy_Effect_EffStr_OnCst = Abilities\Spells\NightElf\Immolation\ImmolationTarget.mdl


-------- Set the model path used on the sorrounding units at the break of the spell --------


Set Dummy_Effect_EffStr_OnBrk = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl


-------- ============================================= --------


Set BP_RealDamage = 20.00


-------- Damage dealt is 20, 40, 60 per sec to the target and --------


-------- at the break of the spell will damage the nearby enemy units to 20, 40, 60 base damage --------


Set BP_Time = 3.00


-------- this is the duration of the spell --------


-------- Time is 3, 6, 9 --------


Set BP_DamageArea = 250


-------- this is the Area of effect --------


-------- increased, multiplied by the spell level --------


-------- AoE is 250, 500, 750 --------
BPCasting

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Binding Poison

Actions


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


Set BP_index_size = (BP_index_size + 1)


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


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



If - Conditions




BP_index_size Greater than BP_index_max



Then - Actions




Set BP_index[BP_index_size] = BP_index_size




Set BP_index_max = BP_index_size



Else - Actions


Set BP_integer = BP_index[BP_index_size]


Set BP_Caster[BP_integer] = (Triggering unit)


Set BP_Target[BP_integer] = (Target unit of ability being cast)


Set BP_TempCasterPosition = (Position of BP_Caster[BP_integer])


Set BP_time[BP_integer] = (BP_Time x (Real((Level of Binding Poison for BP_Caster[BP_integer]))))


Set BP_AbilLevel[BP_integer] = (Level of Binding Poison for BP_Caster[BP_integer])


Set BP_AoE[BP_integer] = ((Real(BP_DamageArea)) x (Real((Level of Binding Poison for BP_Caster[BP_integer]))))


Set BP_DamageInflict[BP_integer] = (BP_RealDamage x (Real((Level of Binding Poison for BP_Caster[BP_integer]))))


Special Effect - Create a special effect attached to the DummyEffect_AttachStr_OnCst of BP_Target[BP_integer] using Dummy_Effect_EffStr_OnCst


Set BP_SpecialEffect[BP_integer] = (Last created special effect)


Custom script: call RemoveLocation(udg_BP_TempCasterPosition)


Trigger - Turn on BPDuration <gen>
BPDuration

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


For each (Integer BP_loop) from 1 to BP_index_size, do (Actions)



Loop - Actions




Set BP_integer = BP_index[BP_loop]




Set BP_TempTargetPosition = (Position of BP_Target[BP_integer])




-------- this damages the enemy unit for a certain period --------




Unit - Cause BP_Caster[BP_integer] to damage BP_Target[BP_integer], dealing BP_DamageInflict[BP_integer] damage of attack type Spells and damage type Normal




-------- if time reaches zero or if target is dead, the loop will end --------




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





If - Conditions






Or - Any (Conditions) are true







Conditions








BP_time[BP_integer] Less than or equal to 0.00








(BP_Target[BP_integer] is dead) Equal to True





Then - Actions






Set BP_DamagedGroup = (Units within BP_AoE[BP_integer] of BP_TempTargetPosition matching (((Matching unit) belongs to an enemy of (Owner of BP_Caster[BP_integer])) Equal to True))






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







Loop - Actions








Unit - Cause BP_Caster[BP_integer] to damage (Picked unit), dealing BP_DamageInflict[BP_integer] damage of attack type Spells and damage type Normal








Special Effect - Create a special effect attached to the DummyEffect_AttachStr_OnBrk of (Picked unit) using Dummy_Effect_EffStr_OnBrk








Special Effect - Destroy (Last created special effect)






Special Effect - Destroy BP_SpecialEffect[BP_integer]






-------- The following recycles indexes which have already ended --------






-------- to avoid unnecessary loops --------






Set BP_index[BP_loop] = BP_index[BP_index_size]






Set BP_index[BP_index_size] = BP_integer






Set BP_index_size = (BP_index_size - 1)






Set BP_loop = (BP_loop - 1)






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







If - Conditions








BP_index_size Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions






Set BP_time[BP_integer] = (BP_time[BP_integer] - 1.00)




Custom script: call RemoveLocation(udg_BP_TempTargetPosition)




Custom script: call DestroyGroup(udg_BP_DamagedGroup)