I mean that in Bribe system there is like 3 types of dmg: Dot, Ranged, mele. But i dont know to use them.
i will post them ::
Damage Engine
Acontecimientos
Partida - UnitIndexEvent becomes Igual a 1.00
Partida - UnitIndexEvent becomes Igual a 2.00
Condiciones
Acciones
-------- Copy the Cheat Death Ability from Object Editor into your map and set the following variable respectively: --------
Set DamageBlockingAbility = Cheat Death Ability (+500,000)
-------- - --------
Set DamageTypeSpell = 1
Set DamageTypeDOT = 2
Set DamageTypeRanged = 3
-------- - --------
Custom script: call ExecuteFunc("InitDamageEvent")
Custom script: endfunction
Custom script:
Custom script: function DmgEvFilter takes nothing returns boolean
-------- - --------
-------- The next conditions let you filter out unwanted units. By default, units with Locust will not pass the check. --------
-------- - --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(TempUnit is Una estructura) Igual a False
Entonces: Acciones
Custom script: return true
Otros: Acciones
Custom script: return false
Custom script: endfunction
Custom script:
Custom script: function DmgEvRemoveAbilities takes nothing returns nothing
Custom script: local real r
Custom script: loop
Set DmgEvN = (DmgEvN - 1)
Custom script: set r = GetWidgetLife(udg_DmgEvStack[udg_DmgEvN])
Unidad - Remove DamageBlockingAbility from DmgEvStack[DmgEvN]
Custom script: call SetWidgetLife(udg_DmgEvStack[udg_DmgEvN], r)
Set DmgEvStack[DmgEvN] = Ninguna unidad
Custom script: exitwhen udg_DmgEvN == 0
Custom script: endloop
Custom script: endfunction
Custom script:
Custom script: function DmgEvSetVars takes nothing returns nothing
Set DamageEventAmount = (Damage taken)
Set DamageEventSource = (Damage source)
Set DamageEventTarget = (Triggering unit)
Custom script: endfunction
Custom script:
Custom script: function FireDmgEv takes nothing returns nothing
Custom script: local boolean b = GetUnitAbilityLevel(udg_DamageEventTarget, udg_DamageBlockingAbility) > 0
Custom script: local real life = 0
Custom script: local real pain = 0
Custom script: if b then
Custom script: set life = GetWidgetLife(udg_DamageEventTarget)
Unidad - Remove DamageBlockingAbility from DamageEventTarget
Custom script: call SetWidgetLife(udg_DamageEventTarget, life)
Custom script: set pain = GetWidgetLife(udg_DamageEventTarget)
Custom script: endif
Set DamageEventPrevAmt = DamageEventAmount
Set DamageEventExplodesUnit = False
Set DamageEventOverride = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
DamageEventAmount Igual a 0.00
Entonces: Acciones
Otros: Acciones
Set DamageModifierEvent = 1.00
Set DamageEvent = 1.00
Custom script: if b then
Unidad - Add DamageBlockingAbility to DamageEventTarget
Custom script: call SetWidgetLife(udg_DamageEventTarget, life + GetWidgetLife(udg_DamageEventTarget) - pain)
Custom script: endif
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
DamageEventAmount No igual a DamageEventPrevAmt
Entonces: Acciones
Set DmgEvLife = ((Vida of DamageEventTarget) + (DamageEventPrevAmt - DamageEventAmount))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
DamageEventAmount Mayor que DamageEventPrevAmt
Entonces: Acciones
Unidad - Set life of DamageEventTarget to (Max(0.41, DmgEvLife))
Custom script: if udg_DmgEvLife <= .405 then
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
DamageEventExplodesUnit Igual a True
Entonces: Acciones
Unidad - Make DamageEventTarget Explotar on death
Otros: Acciones
Detonador - Turn off DamageEventTrigger
Custom script: call UnitDamageTarget(udg_DamageEventSource, udg_DamageEventTarget, 999, false, false, null, null, null)
Detonador - Turn on DamageEventTrigger
Custom script: endif
Otros: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(Vida máx. of DamageEventTarget) Menor que DmgEvLife
Entonces: Acciones
Unidad - Add DamageBlockingAbility to DamageEventTarget
Set DmgEvStack[DmgEvN] = DamageEventTarget
Set DmgEvN = (DmgEvN + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
Entonces: Acciones
Custom script: call TimerStart(udg_DmgEvTimer, 0, false, function DmgEvRemoveAbilities)
Otros: Acciones
Otros: Acciones
Unidad - Set life of DamageEventTarget to DmgEvLife
Otros: Acciones
Custom script: endfunction
Custom script:
Custom script: function FireRecursiveDmgEv takes nothing returns nothing
Custom script: local real d = udg_DamageEventAmount
Custom script: local unit s = udg_DamageEventSource
Custom script: local unit t = udg_DamageEventTarget
Custom script: local integer ptype = udg_DmgTypPrev
Custom script: local boolean explode = udg_DamageEventExplodesUnit
Custom script: local boolean override = udg_DamageEventOverride
Custom script: local real prev = udg_DamageEventPrevAmt
Custom script: call DmgEvSetVars()
Custom script: if udg_DamageEventTarget != t or udg_DamageEventSource != s or udg_DamageEventAmount != d or udg_DamageEventType != ptype then
Set DamageEvent = 0.00
Set DamageModifierEvent = 0.00
Custom script: call FireDmgEv()
-------- - --------
-------- Delete the next three lines to disable the in-game recursion crash warnings --------
-------- - --------
Custom script: else
Secuencia cinematográfica - Clear the screen of text messages for (All players)
Partida - Display to (All players) for 999.00 seconds the text: WARNING: Recursion ...
-------- - --------
Custom script: endif
Custom script: set udg_DamageEventOverride = override
Custom script: set udg_DamageEventExplodesUnit = explode
Custom script: set udg_DamageEventPrevAmt = prev
Custom script: set udg_DmgTypPrev = ptype
Custom script: set udg_DamageEventAmount = d
Custom script: set udg_DamageEventSource = s
Custom script: set udg_DamageEventTarget = t
Custom script: set s = null
Custom script: set t = null
Custom script: endfunction
Custom script:
Custom script: function OnDmgEv takes nothing returns boolean
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
Entonces: Acciones
Set DmgTypPrev = DamageEventType
Custom script: call DmgEvSetVars()
Custom script: call FireDmgEv()
Set DamageModifierEvent = 0.00
Set DamageEvent = 0.00
Set DamageEventType = 0
Otros: Acciones
Custom script: call FireRecursiveDmgEv()
Custom script: return false
Custom script: endfunction
Custom script:
Custom script: function CreateDmgEv takes nothing returns nothing
Custom script: set udg_DamageEventTrigger = CreateTrigger()
Custom script: call TriggerAddCondition(udg_DamageEventTrigger, Filter(function OnDmgEv))
Custom script: endfunction
Custom script:
Custom script: function SetupDmgEv takes nothing returns boolean
Custom script: local integer pdex = udg_UDex
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
UnitIndexEvent Igual a 1.00
Entonces: Acciones
Set TempUnit = UDexUnits[UDex]
Custom script: if GetUnitAbilityLevel(udg_TempUnit, 'Aloc') == 0 and DmgEvFilter() then
Set UnitDamageRegistered[UDex] = True
Detonador - Add to DamageEventTrigger the event (Unidad - TempUnit Recibe daño)
Custom script: endif
Otros: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
UnitDamageRegistered[UDex] Igual a True
Entonces: Acciones
Set UnitDamageRegistered[UDex] = False
Set DamageEventsWasted = (DamageEventsWasted + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
DamageEventsWasted Igual a 15
Entonces: Acciones
Set DamageEventsWasted = 0
Custom script: call DestroyTrigger(udg_DamageEventTrigger)
Custom script: call CreateDmgEv()
Set UDex = UDexNext[0]
Custom script: loop
Custom script: exitwhen udg_UDex == 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
UnitDamageRegistered[UDex] Igual a True
Entonces: Acciones
Detonador - Add to DamageEventTrigger the event (Unidad - UDexUnits[UDex] Recibe daño)
Otros: Acciones
Set UDex = UDexNext[UDex]
Custom script: endloop
Custom script: set udg_UDex = pdex
Otros: Acciones
Otros: Acciones
Custom script: return false
Custom script: endfunction
Custom script:
Custom script: function InitDamageEvent takes nothing returns nothing
Custom script: call CreateDmgEv()
Custom script: call TriggerAddCondition(GetTriggeringTrigger(), Filter(function SetupDmgEv))
Set UnitIndexerEnabled = False
Custom script: set udg_TempUnit = CreateUnit(Player(15), 'uloc', 0, 0, 0)
Set UnitIndexerEnabled = True
Unidad - Add DamageBlockingAbility to TempUnit
Unidad - Remove TempUnit from the game
Cuenta atrás del reloj - Start DmgEvTimer as a Un tiro timer that will expire in 0.00 seconds
Detonador - Run (This trigger) (checking conditions)
See the 3 ones :
Set DamageTypeSpell = 1
Set DamageTypeDOT = 2
Set DamageTypeRanged = 3
How do i use them ??
Last edited by a moderator: Mar 15, 2014