• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Regeneration Field

--Regeneration Field--
Sates area around caster with holy magic, that restores mana and health of allied units.

Level 1 - 20 hp, 10 mp per second, 250 aoe, last 10 seconds.
Level 2 - 40 hp, 20 mp per second, 350 aoe, last 15 seconds.
Level 3 - 60 hp, 30 mp per second, 450 aoe, last 20 seconds.

  • RF A
    • События
      • Боевая единица - A unit РџСЂРёРІРѕРґРёС‚ способность РІ действие
    • Условия
      • (Ability being cast) равно Restoration Field
    • Действия
      • -------- ------------------------ --------
      • -------- If trigger B is not used, we need to turn it ON --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Если - Условия
          • RF_Switch равно 0
        • РўРѕ - Действия
          • Триггер - Turn on RF B <gen>
        • Р&#152;наче - Действия
      • -------- ------------------------ --------
      • -------- Castnumber is index of array variables, we need to add 1 to this variable, allows to make spell mui --------
      • Set RF_CastNumber = (RF_CastNumber + 1)
      • -------- we increase Switch by 1, it means that one more unit being use trigger B --------
      • Set RF_Switch = (RF_Switch + 1)
      • -------- confirms that ability is used by CastNumber index --------
      • Set RF_Off[RF_CastNumber] = Да
      • -------- ------------------------ --------
      • -------- define caster and level of ability being cast for it --------
      • Set RF_Caster[RF_CastNumber] = (Triggering unit)
      • Set RF_AbilityLevel[RF_CastNumber] = (Level of Restoration Field for RF_Caster[RF_CastNumber])
      • -------- ------------------------ --------
      • -------- establish Area of Effect, Amount of regeneration and duration of spell --------
      • Set RF_AoE[RF_CastNumber] = (75.00 + (50.00 x (Real(RF_AbilityLevel[RF_CastNumber]))))
      • Set RF_Amount[RF_CastNumber] = (10.00 x (Real(RF_AbilityLevel[RF_CastNumber])))
      • Set RF_Time[RF_CastNumber] = (5.00 + (5.00 x (Real((Level of Restoration Field for RF_Caster[RF_CastNumber])))))
      • -------- ------------------------ --------
      • -------- just set this to 0.00 =) --------
      • Set RF_Distance[RF_CastNumber] = 0.00
      • Set RF_Angle[RF_CastNumber] = 0.00
      • -------- ------------------------ --------
      • -------- establish position of caster to avoid leak when creating missiles --------
      • Set RF_Point[0] = (Position of RF_Caster[RF_CastNumber])
      • -------- ------------------------ --------
      • -------- we sets effect strings, you can modify this easy --------
      • Set RF_EffectString[0] = Abilities\Weapons\ProcMissile\ProcMissile.mdl
      • Set RF_EffectString[1] = Abilities\Spells\Other\Transmute\GoldBottleMissile.mdl
      • -------- ------------------------ --------
      • -------- we creates "effects" this is 2 dummie units with Locust ability --------
      • Боевая единица - Create 1 Effect: Missile for (Owner of RF_Caster[RF_CastNumber]) at RF_Point[0] facing Стандартная ориентация зданий degrees
      • Set RF_Missile1[RF_CastNumber] = (Last created unit)
      • Боевая единица - Add Превратиться РІ РІРѕСЂРѕРЅР° to (Last created unit)
      • Анимация - Change (Last created unit) flying height to 75.00 at 0.00
      • Боевая единица - Create 1 Effect: Missile for (Owner of RF_Caster[RF_CastNumber]) at RF_Point[0] facing Стандартная ориентация зданий degrees
      • Set RF_Missile2[RF_CastNumber] = (Last created unit)
      • Боевая единица - Add Превратиться РІ РІРѕСЂРѕРЅР° to (Last created unit)
      • Анимация - Change (Last created unit) flying height to 75.00 at 0.00
      • -------- ------------------------ --------
      • -------- we removing location to avoid leak --------
      • Custom script: call RemoveLocation (udg_RF_Point[0])
  • RF B
    • События
      • Время - Every 0.03 seconds of game time
    • Условия
    • Действия
      • For each (Integer RF) from 1 to RF_CastNumber, do (Actions)
        • Цикл - Действия
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Если - Условия
              • RF_Off[RF] равно Да
            • РўРѕ - Действия
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Если - Условия
                  • Or - Any (Conditions) are true
                    • Условия
                      • (RF_Caster[RF] is dead) равно Да
                      • RF_Time[RF] меньше или равно 0.00
                • РўРѕ - Действия
                  • -------- when time expired/caster dead we need to remove "effects" --------
                  • -------- ------------------------ --------
                  • Боевая единица - Kill RF_Missile1[RF]
                  • Боевая единица - Kill RF_Missile2[RF]
                  • -------- ------------------------ --------
                  • -------- confirm that ability is not used for index RF --------
                  • Set RF_Off[RF] = Нет
                  • -------- confirm that one unit less use this trigger, and if it equals to 0 we can reset indexes and turn trigger off --------
                  • Set RF_Switch = (RF_Switch - 1)
                  • -------- ------------------------ --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Если - Условия
                      • RF_Switch равно 0
                    • РўРѕ - Действия
                      • Set RF_CastNumber = 0
                      • Триггер - Turn off RF B <gen>
                    • Р&#152;наче - Действия
                • Р&#152;наче - Действия
                  • -------- ------------------------ --------
                  • -------- if distance is not equals to area of effect we increase it --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Если - Условия
                      • RF_Distance[RF] меньше RF_AoE[RF]
                    • РўРѕ - Действия
                      • Set RF_Distance[RF] = (RF_Distance[RF] + 10.00)
                    • Р&#152;наче - Действия
                  • -------- we slightly increase angle to create rotation effect --------
                  • Set RF_Angle[RF] = (RF_Angle[RF] + 15.00)
                  • -------- Time is our timer and it must be reduced by 0.03 (trigger runs every 0.03secs) --------
                  • Set RF_Time[RF] = (RF_Time[RF] - 0.03)
                  • -------- ------------------------ --------
                  • -------- establish position of caster and point for each "effect" --------
                  • Set RF_Point[1] = (Position of RF_Caster[RF])
                  • Set RF_Point[2] = (RF_Point[1] offset by RF_Distance[RF] towards RF_Angle[RF] degrees)
                  • Set RF_Point[3] = (RF_Point[1] offset by RF_Distance[RF] towards (RF_Angle[RF] + 180.00) degrees)
                  • -------- ------------------------ --------
                  • -------- moving effects in their points --------
                  • Боевая единица - Move RF_Missile1[RF] instantly to RF_Point[2], facing RF_Angle[RF] degrees
                  • Боевая единица - Move RF_Missile2[RF] instantly to RF_Point[3], facing (RF_Angle[RF] + 180.00) degrees
                  • -------- ------------------------ --------
                  • -------- creating special effects --------
                  • Спецэффект - Create a special effect at RF_Point[2] using RF_EffectString[0]
                  • Спецэффект - Destroy (Last created special effect)
                  • Спецэффект - Create a special effect at RF_Point[3] using RF_EffectString[0]
                  • Спецэффект - Destroy (Last created special effect)
                  • -------- ------------------------ --------
                  • -------- triggers runs every 0.03 seconds, but we need to heal units every second --------
                  • -------- we use Spam variable if it equals to 33 (33*0.03=0.99) we heals units --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Если - Условия
                      • RF_Spam[RF] равно 33
                    • РўРѕ - Действия
                      • -------- ------------------------ --------
                      • -------- set Spam to 0 and it will accumulate again --------
                      • Set RF_Spam[RF] = 0
                      • -------- establish allies around and store them in variable --------
                      • Set RF_Group = (Units within RF_AoE[RF] of RF_Point[1] matching ((((((Matching unit) is Здание) равно Нет) and (((Matching unit) is Техника) равно Нет)) and (((Matching unit) is dead) равно Нет)) and (((Matching unit) belongs to an ally
                      • Отряд - Pick every unit in RF_Group and do (Actions)
                        • Цикл - Действия
                          • Set RF_Units[RF] = (Picked unit)
                          • -------- increasing current mana and health of stored units --------
                          • Боевая единица - Set life of RF_Units[RF] to ((Р—РґРѕСЂРѕРІСЊРµ of RF_Units[RF]) + (RF_Amount[RF] x 2.00))
                          • Боевая единица - Set mana of RF_Units[RF] to ((Мана of RF_Units[RF]) + RF_Amount[RF])
                          • -------- creating effect --------
                          • Спецэффект - Create a special effect attached to the origin of RF_Units[RF] using RF_EffectString[1]
                          • Спецэффект - Destroy (Last created special effect)
                      • -------- ------------------------ --------
                      • -------- destroying group --------
                      • Custom script: call DestroyGroup (udg_RF_Group)
                    • Р&#152;наче - Действия
                      • -------- if Spam not equals to 33 yet, we increase it --------
                      • Set RF_Spam[RF] = (RF_Spam[RF] + 1)
                  • -------- ------------------------ --------
                  • -------- removing locations --------
                  • Custom script: call RemoveLocation (udg_RF_Point[1])
                  • Custom script: call RemoveLocation (udg_RF_Point[2])
                  • Custom script: call RemoveLocation (udg_RF_Point[3])
            • Р&#152;наче - Действия
Spell can be used by multiple units, leakless and easy to modify.

please comment and rate

Keywords:
Regeneration, Restoration, Light, Holy, Aoe, Heal
Contents

Regeneration Field (Map)

Reviews
20:20, 5th Apr 2010 The_Reborn_Devil: The triggering looks ok and it's MUI. Status: Approved Rating: Useful

Moderator

M

Moderator

20:20, 5th Apr 2010
The_Reborn_Devil:

The triggering looks ok and it's MUI.


Status: Approved
Rating: Useful
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
Em Wt on earth did you do all these triggers for must of taken ages. was just wondering if it would of been easier if you had based the spell on healingwardaura or life regen aura and made them only last certain amount of time and then chagned to hero spell?
Would that work also?
 
Level 14
Joined
Nov 2, 2008
Messages
579
Triggering looks ok I guess.

However
  • For each (Integer RF) from 1 to RF_CastNumber, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RF_Off[RF] Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RF_Caster[RF] is dead) Equal to True
                  • RF_Time[RF] Less than or equal to 0.00
Can be
  • For each (Integer RF) from 1 to RF_CastNumber, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RF_Off[RF] Equal to True
          • (RF_Caster[RF] is dead) Equal to True
          • RF_Time[RF] Less than or equal to 0.00
Rest looks fine though. Nice work.
 
Level 9
Joined
Jul 9, 2008
Messages
67
For each (Integer RF) from 1 to RF_CastNumber, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RF_Off[RF] Equal to True
Or - Any (Conditions) are true
Conditions
(RF_Caster[RF] is dead) Equal to True
RF_Time[RF] Less than or equal to 0.00

that's right?
 
Top