JASS:
//====
//====
//====
//====
//====
//====
//==== Open Source Healing Engine.... v.007
//==== Idea by Wrooks aka Squelch
//====
//====
//====
//====
//====
//====
//==== Foreword
//==== This system purpose is to be so that mapmakers have a fully functional
//==== healing system for health and mana. What this means is that it allows them
//==== to increase and reduce healing with spells and item usage.
//====
//==== This idea is being created mainly as a suggestion for dota 1. So if you
//==== feel uneasy about that then don't contribute. This is open source so when
//==== its complete it can be used in anyones map.
//====
//==== Please report any updates have for the system to this thread
//====
//==== I'm a newbie so thats why im making this open source. If anyone can get a mod
//==== to make it so anyone can change the thread then thanks
//====
//==== If you want to test it out or add please download bribe's damage detection system.
//====
//====
//====
//====
//====
//====
//==== Contributers
//==== Wrooks
//====
//====
//====
//====
//====
//====
//====
//====
//====
//==== Troubleshooters
//==== LorDz
//==== Arhowk
//====
//====
//====
//====
//====
//====
//====
//====
//==== Systems Used
//==== Bribe's Damage Engine
//==== Nestharus' UnitIndexer
//====
//====
//====
//====
//====
//====
//==== Goals
//==== Status: incomplete ~ Idea: list of variables
//==== Status: incomplete ~ Idea: healing resistance
//==== Status: incomplete ~ Idea: reserved health (might be Done)
//==== Status: incomplete ~ Idea: hp block resistance
//==== Status: incomplete ~ Idea: healing block (partially started)
//==== Status: incomplete ~ Idea: bonus healing
//==== Status: incomplete ~ Idea: ability indexing
//==== Status: incomplete ~ Idea: triggered aoe
//==== Status: incomplete ~ Idea: triggered chain spell
//==== Status: incomplete ~ Idea: item indexing
//==== Status: incomplete ~ Idea: healing resistance
//==== Status: incomplete ~ Idea: healing steal (in all its forms)
//==== Status: incomplete ~ Idea: healing spread
//==== Status: incomplete ~ Idea: healing Return (in all its forms)
//==== Status: incomplete ~ Idea: healing Return (in all its forms)
//==== Status: incomplete ~ Idea: mana equivelants
//==== Status: incomplete ~ Idea: mana equivelants
//==== Status: incomplete ~ Idea: HP Block resistance (Partially)
//==== Status: incomplete ~ Idea: Grave
//==== Status: incomplete ~ Idea: frostbite
//==== Status: incomplete ~ Idea: Healing shockwave
//==== Status: incomplete ~ Idea: Greatful Healer (in all its forms
//====
//====
//====
//====
//====
//====
//==== List of Nash Variables
//====
//==== udg_Heal_Block_Min = Minimum amount of healing that can be reduced
//==== udg_Heal_Block_Max = Maximum amount of healing that can be reduced
//==== udg_Heal_Blo_Multi = Restistance to Healing block
//==== udg_Pre_Mana = Sets mana to a previous state
//==== udg_Pre_Life = Sets life to a previous state
//==== udg_Mana_Bone_Max = when caculating a random number to be the bonus amount. This is the cap used to find out the random number.
//==== udg_Mana_Bone_Min = When calculating a random number to be the bonus amount. This is the minimum number used to find out the random number
//==== udg_Mana_Blo_Multi = Resistance amount (should be below 1)
//==== udg_Mana_Block_Min = When calculating a random number to be the amount that is blocked. This is the minimum number used to find out the random number.
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====List of Non-Nash Variables
//====Replen_Target = Unit targeted by the healing spell
//====Replen_Caster = Unit casting the healing spell
//====Counter_Heal = When a unit has has more hp then they need this helps
//==== record when they are damaged
//==== Counter_Mana = When a unit has more mana then they need this helps record
//==== when they are damaged.
//==== udg_life_curr = current hp
//==== udg_Hp_Block = picks a random number between minimum block and maximum
//==== udg_Heal_Blo_Sub = calculates the restance to healing block
//==== udg_Mana_Max = mana at its maximum state
//==== udg_Mana_Curr = mana at its current state
//==== udg_Mana_Per = a percentage of mana.
//==== udg_Mana_Bone_Act = the amount of bonus mana added to the heal after calculations.
//==== udg_Mp_Bonus = the amount of bonus mana before calculations
//==== udg_Mana_Blo_Reduc = mana block after calculations
//==== udg_Mana_Block_Sub = Mana Resistance after calculations
//==== udg_Mp_Block = random number calculation
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//==== Idea Explanation
//====Bonus Healing - Bonus healing is an extra amount of health replenished
//==== when a unit is healed.
//====
//==== Ability Indexer - Makes it so that when a programmer wants to make a
//==== spell alls they have to do is enter in some variables.
//==== and set the
//==== numbers for it
//====
//==== triggered aoe - this is so that when a person uses an aoe spell
//==== it calculates all the bonus healing + healing block
//==== + healing resistance etc
//====
//==== triggered chain spell - a chain spell that is completely triggered so
//==== that when a mapmaker wants to include the healing
//==== engine to all effected units it applies it to them
//====
//==== triggered HOT - Heal over time.... or regeneration spells
//====
//==== Item indexer - makes it so that an item can be created sole through
//==== triggers
//====
//==== healing resistance - a percentage of health that is reduced with each heal
//====
//==== healing steal - forms of healing that use enemy replenishment to heal
//==== themselves
//====
//==== steal v1 - Nearby enemy uses healing and that applies to all allies
//==== within the area
//====
//==== steal v2 - causes an enemy heal to be used on self.
//====
//==== steal v3 - same as one but is an aoe that follows an ally around.
//====
//==== healing spread - causes healing of single targets to distribute to
//==== surrounding allies.
//====
//==== global healing - heals all heroes on the map
//====
//==== reserved healing - records when healing goes over the targets max hp and
//==== keeps them near full health until they reach that.
//====
//==== frostbite - healing that doesn't heal over a certain point
//====
//==== grave - healing that doesn't go below a certain point
//====
//==== mana equivelant - applying all the healing ideas to mana
//====
//==== hp block - healing that is reduced
//====
//==== shockwave healing - a heal done through a shockwave skill.
//==== Greatful Healer - 4 forms basically it heals passively
//==== Greatful v1 - Passive
//==== Greatful v2 - passively heals but has an expire date and it can be casted on allies.
//==== Greatful v3 - Heals whenever a unit is summoned
//==== Greatful v4 - heals when certain spells are used.
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//==== Vocablulary
//==== Nash - The idea for this is that when a person makes a spell for the
//==== engine. alls they need to do is enter in variables and put in
//==== numbers for those variables. and it creates a spell for them.
//==== using the ability and item indexer.
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
//====
-
Example NASH SPELL
-
Events
- Game - AbilityIndex becomes Equal to 1.00
- Conditions
-
Actions
- -------- This is an example of what can happen after the everything is completed --------
- Set AbilityCode = n000
- Set Ability_Has_resistance = true
- Set Magic_Immunity = False
- Set Mana_Cost = 100
- Set Health_Cost = 0
- Set Health_Resistance_Immunity = False
- Set Ability_Type = 1
- Set Cast_Health_Resistance = .35
- Set Targeting_Type = 1
- Set Item_Immunity = False
-
Set etc = 1
- -------- This is what im hoping to achieve with the addition of this system --------
-
Events
JASS:
function Startup takes nothing returns nothing
local unit Replen_Target
local unit Replen_Caster
set Replen_Target = GetSpellTargetUnit()
local real Counter_Heal = udg_DamageEventAmount
local real Counter_Mana = udg_DamageEventAmount
set Replen_Caster =
set udg_life_Curr = GetUnitStateSwap(UNIT_STATE_LIFE, Replen_Target)
//==== These can be changed to set minimum amount of blocked hp, the max and how much is reduced. ====
set udg_Heal_Block_Min = 0
set udg_Heal_Block_Max = 10
set udg_Heal_Blo_Multi = I2R(0.2)
//==== Calculations for hp ====
set udg_Hp_Block = GetRandomReal(udg_Block_Min, udg_Block_Max)
set udg_Heal_Blo_Sub = ( udg_Block * udg_Blo_Multi )
set udg_Heal_Blo_Reduc = ( udg_HP_Block - udg_Bl_Sub )
//==== These can be changed to set minimum amount of bonus hp, the max ====
set udg_Heal_Bone_Min = 0
set udg_Heal_Bone_Max = 10
//==== Calculations for hp ====
set udg_Hp_Bonus = GetRandomReal(udg_Block_Min, udg_Block_Max)
set udg_Heal_Bone_Act = ( udg_HP_Bonus - udg_Bl_Reduct )
set udg_Life_Per = GetUnitLifePercent( Replen_Target)
set udg_life_Curr = GetUnitStateSwap(UNIT_STATE_LIFE, Replen_Target)
set udg_Life_Max = GetUnitStateSwap(((UNIT_STATE_MAX_LIFE - I2R(10)), Replen_Target)
//==== what life is set to prior to heal and after.
set udg_Life_Pre = 0
set udg_Life_Af = 0
set udg_Life_Healable = 1
//==== Caclulations for reserved heealing
if ( udg_Life_Ex >= udg_Life_Max ) then
return ( udg_Reserved_Effect == 1 )
set udg_Life_Ex = ( udg_Life_Af - udg_Life_Max )
set udg_Life_State = (udg_Life_Ex - Counter_Heal)
//==== If the register trigger doesn't work exchange startup for gg_trg_Healing_Engine
call TriggerRegisterVariableEvent( Startup, "udg_DamageModifierEvent", EQUAL, 1.00 )
return udg_DamageEventOverride == false
call SetUnitLifeBJ( udg_DamageEventTarget, (UNIT_STATE_MAX_LIFE - I2R(1)) )
elseif (( GetRandomInt((udg_Life_Max), UNIT_STATE_MAX_LIFE - I2R(1)) == true ) then
set udg_Life_State = (Counter_Heal - udg_Life_Ex)
call SetUnitLifeBJ( udg_DamageEventTarget, (udg_Life_State - udg_Life_Max)
else
endif
//==== These can be changed to set minimum amount of blocked Mana, the max and how much is reduced. ====
set udg_Mana_Block_Min = 0
set udg_Mana_Block_Max = 10
set udg_Mana_Blo_Multi = 0.2
//==== Calculations for Mana ====
set udg_Mp_Block = GetRandomReal(udg_Block_Min, udg_Block_Max)
set udg_Mana_Blo_Sub = ( udg_Block * udg_Blo_Multi )
set udg_Mana_Blo_Reduc = ( udg_HP_Block - udg_Bl_Sub )
//==== These can be changed to set minimum amount of bonus mana, the max ====
set udg_Mana_Bone_Min = 0
set udg_Mana_Bone_Max = 10
//==== Calculations for mana ====
set udg_Mp_Bonus = GetRandomReal(udg_Block_Min, udg_Block_Max)
set udg_Mana_Bone_Act = ( udg_HP_Bonus - udg_Bl_Reduct )
set udg_Mana_Per = GetUnitManaPercent( Replen_Target)
set udg_Mana_Curr = GetUnitStateSwap(UNIT_STATE_MANA, Replen_Target)
set udg_Mana_Max = GetUnitStateSwap(UNIT_STATE_MAX_MANA, Replen_Target)
//==== what mana is set to prior to heal and before.
set udg_Pre_Mana = 0
set udg_Af_Mana = 0
call ExecuteFunc("EngineIniti")
endfunction
function Trig_NewTrigger_Conditions takes nothing returns boolean
return
endfunction
function Trig_NewTrigger_Actions takes nothing returns nothing
set udg_
endfunction
//==== Init Trigger NewTrigger ====
function EngineIniti takes nothing returns nothing
set Eng_Init_tri = GetTriggeringTrigger()
call TriggerRegisterUnitEvent( Eng_Init_Tri, udg_HealedUnit, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition(Eng_Init_Tri, Condition(function Trig_NewTrigger_Conditions))
call TriggerAddAction(Eng_Init_Tri, function Trig_NewTrigger_Actions)
endfunction
//===========================================================================
function InitTrig_Healing_Engine takes nothing returns nothing
set gg_trg_Healing_Engine = CreateTrigger( )
call TriggerRegisterVariableEvent( gg_trg_Healing_Engine, "udg_Healing_Trigg_Initi", EQUAL, 1.00 )
call TriggerAddAction( gg_trg_Healing_Engine, function Startup )
endfunction
-
Bribe's Damage Engine
-
Events
- Game - UnitIndexEvent becomes Equal to 1.00
- Game - UnitIndexEvent becomes Equal to 2.00
- Conditions
-
Actions
- -------- 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)
-
If - Conditions
- (TempUnit is A structure) Equal to False
-
Then - Actions
- Custom script: return true
- Else - Actions
-
If - Conditions
- 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])
- Unit - Remove DamageBlockingAbility from DmgEvStack[DmgEvN]
- Custom script: call SetWidgetLife(udg_DmgEvStack[udg_DmgEvN], r)
- Set DmgEvStack[DmgEvN] = No unit
- 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)
- Unit - 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)
-
If - Conditions
- DamageEventAmount Equal to 0.00
-
Then - Actions
- Set DamageEvent = 2.00
-
Else - Actions
- Set DamageModifierEvent = 1.00
- Set DamageEvent = 1.00
-
If - Conditions
- Custom script: if b then
- Unit - 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)
-
If - Conditions
- DamageEventAmount Not equal to DamageEventPrevAmt
-
Then - Actions
- Set DmgEvLife = ((Life of DamageEventTarget) + (DamageEventPrevAmt - DamageEventAmount))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DamageEventAmount Greater than DamageEventPrevAmt
-
Then - Actions
- Unit - 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)
-
If - Conditions
- DamageEventExplodesUnit Equal to True
-
Then - Actions
- Unit - Make DamageEventTarget Explode on death
- Else - Actions
-
If - Conditions
- Trigger - Turn off DamageEventTrigger
- Custom script: call UnitDamageTarget(udg_DamageEventSource, udg_DamageEventTarget, 999, false, false, null, null, null)
- Trigger - Turn on DamageEventTrigger
- Custom script: endif
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Max life of DamageEventTarget) Less than DmgEvLife
-
Then - Actions
- Unit - 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)
-
If - Conditions
- DmgEvN Equal to 1
-
Then - Actions
- Custom script: call TimerStart(udg_DmgEvTimer, 0, false, function DmgEvRemoveAbilities)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Unit - Set life of DamageEventTarget to DmgEvLife
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Else - Actions
-
If - Conditions
- 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
- Cinematic - Clear the screen of text messages for (All players)
- Game - 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)
-
If - Conditions
- DamageEvent Equal to 0.00
-
Then - Actions
- Set DmgTypPrev = DamageEventType
- Custom script: call DmgEvSetVars()
- Custom script: call FireDmgEv()
- Set DamageModifierEvent = 0.00
- Set DamageEvent = 0.00
- Set DamageEventType = 0
-
Else - Actions
- Custom script: call FireRecursiveDmgEv()
-
If - Conditions
- 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)
-
If - Conditions
- UnitIndexEvent Equal to 1.00
-
Then - Actions
- Set TempUnit = UDexUnits[UDex]
- Custom script: if GetUnitAbilityLevel(udg_TempUnit, 'Aloc') == 0 and DmgEvFilter() then
- Set UnitDamageRegistered[UDex] = True
- Trigger - Add to DamageEventTrigger the event (Unit - TempUnit Takes damage)
- Custom script: endif
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnitDamageRegistered[UDex] Equal to True
-
Then - Actions
- Set UnitDamageRegistered[UDex] = False
- Set DamageEventsWasted = (DamageEventsWasted + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DamageEventsWasted Equal to 15
-
Then - Actions
- 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)
-
If - Conditions
- UnitDamageRegistered[UDex] Equal to True
-
Then - Actions
- Trigger - Add to DamageEventTrigger the event (Unit - UDexUnits[UDex] Takes damage)
- Else - Actions
-
If - Conditions
- Set UDex = UDexNext[UDex]
- Custom script: endloop
- Custom script: set udg_UDex = pdex
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- 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
- Unit - Add DamageBlockingAbility to TempUnit
- Unit - Remove TempUnit from the game
- Countdown Timer - Start DmgEvTimer as a One-shot timer that will expire in 0.00 seconds
- Trigger - Run (This trigger) (checking conditions)
-
Events
-
Nestharus' Unit Indexer
-
Events
- Map initialization
- Conditions
-
Actions
- Custom script: call ExecuteFunc("InitializeUnitIndexer")
- Custom script: endfunction
- Custom script:
- Custom script: function ClearUnitIndex takes nothing returns nothing
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Custom value of UDexUnits[UDex]) Equal to 0
-
Then - Actions
- Set UnitIndexLock[UDex] = (UnitIndexLock[UDex] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnitIndexLock[UDex] Equal to 0
-
Then - Actions
- Set UDexNext[UDexPrev[UDex]] = UDexNext[UDex]
- Set UDexPrev[UDexNext[UDex]] = UDexPrev[UDex]
- Set UDexPrev[UDex] = 0
- Set UnitIndexEvent = 0.00
- Set UnitIndexEvent = 2.00
- Set UnitIndexEvent = 0.00
- Set UDexUnits[UDex] = No unit
- Set UDexNext[UDex] = UDexRecycle
- Set UDexRecycle = UDex
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Custom script: endfunction
- Custom script:
- Custom script: function IndexUnit takes nothing returns boolean
- Custom script: local integer pdex = udg_UDex
- Custom script: local integer ndex
- -------- - --------
- -------- You can customize the following block - if conditions are false the (Matching unit) won't be indexed. --------
- -------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnitIndexerEnabled Equal to True
- (Custom value of (Matching unit)) Equal to 0
-
Then - Actions
- Set UDexWasted = (UDexWasted + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UDexWasted Equal to 15
-
Then - Actions
- Set UDexWasted = 0
- Set UDex = UDexNext[0]
- Custom script: loop
- Custom script: exitwhen udg_UDex == 0
- Custom script: set ndex = udg_UDexNext[udg_UDex]
- Custom script: call ClearUnitIndex()
- Custom script: set udg_UDex = ndex
- Custom script: endloop
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UDexRecycle Equal to 0
-
Then - Actions
- Set UDex = (UDexGen + 1)
- Set UDexGen = UDex
-
Else - Actions
- Set UDex = UDexRecycle
- Set UDexRecycle = UDexNext[UDex]
-
If - Conditions
- Set UDexUnits[UDex] = (Matching unit)
- Unit - Set the custom value of UDexUnits[UDex] to UDex
- Set UDexPrev[UDexNext[0]] = UDex
- Set UDexNext[UDex] = UDexNext[0]
- Set UDexNext[0] = UDex
- Set UnitIndexLock[UDex] = 1
- Set UnitIndexEvent = 0.00
- Set UnitIndexEvent = 1.00
- Set UnitIndexEvent = 0.00
- Custom script: set udg_UDex = pdex
- Else - Actions
-
If - Conditions
- Custom script: return false
- Custom script: endfunction
- Custom script:
- Custom script: function InitializeUnitIndexer takes nothing returns nothing
- Custom script: local integer i = 16
- Custom script: local boolexpr b = Filter(function IndexUnit)
- Custom script: local region re = CreateRegion()
- Custom script: local trigger t = GetTriggeringTrigger()
- Custom script: local rect r = GetWorldBounds()
- Custom script: call RegionAddRect(re, r)
- Custom script: call TriggerRegisterEnterRegion(t, re, b)
- Custom script: call TriggerClearActions(t)
- Custom script: call TriggerAddAction(t, function ClearUnitIndex)
- Set UnitIndexerEnabled = True
- Custom script: loop
- Custom script: set i = i - 1
- Custom script: call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup, Player(i), b)
- Custom script: exitwhen i == 0
- Custom script: endloop
- Custom script: call RemoveRect(r)
- Custom script: set re = null
- Custom script: set r = null
- Custom script: set t = null
- Custom script: set b = null
- Set UnitIndexEvent = 3.00
- Set UnitIndexEvent = 0.00
- Set Healing_Trigg_Initi = 1.00
-
Events
------ changes thus far v002 in readme made it more friendlier for eyes.
------ changes thus far v003 in readme added description for healing return
------ changes thus far v004 in healing engine added something for I think I finished the reserved healing not sure
------ changes thus far v005 added things to the read me (variables, new skills, etc) Fixed some things with the Health Engine Doc
------ changes thus far v006 clarified when I was usikng someone elses system for my system.
------ changes thus far v007 added troubleshooters section
Last edited: