• 🏆 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!

Holy Bomb v1.02

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
well, this is my entry for a group contest....
nothing much to explain, if there's something wrong, contact me ^

Init
  • Holy Bomb Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set HB_Effects[1] = Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Set HB_Effects[2] = Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
      • Set HB_EffectsCount = 2
      • Set HB_Shockwaves = 3
Cast
  • Holy Bomb Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Bomb
    • Actions
      • Set HB_Caster = (Triggering unit)
      • Set HB_Point = (Position of HB_Caster)
      • Unit - Create 1 Holy Bomb for (Owner of HB_Caster) at HB_Point facing (Random angle) degrees
      • Custom script: call RemoveLocation(udg_HB_Point)
Detonate
  • Holy Bomb Detonate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Detonate
    • Actions
      • Set HB_Caster = (Triggering unit)
      • Set HB_Group = (Units owned by (Owner of HB_Caster) of type Holy Bomb)
      • Unit Group - Pick every unit in HB_Group and do (Actions)
        • Loop - Actions
          • Set HB_Dummy = (Picked unit)
          • Set HB_Point = (Position of HB_Dummy)
          • Set HB_TempGroup = (Units within 250.00 of HB_Point matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)))
          • For each (Integer HB_TempInt) from 1 to HB_EffectsCount, do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect at HB_Point using HB_Effects[HB_TempInt]
              • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_HB_Point)
          • Unit Group - Pick every unit in HB_TempGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in HB_Group) Greater than 0
                • Then - Actions
                  • Set HB_Target = (Picked unit)
                  • Set HB_Point = (Position of HB_Target)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (HB_Target belongs to an ally of (Owner of HB_Dummy)) Equal to True
                      • (Percentage life of HB_Target) Less than 100.00
                    • Then - Actions
                      • Unit - Create 1 Holy Light Dummy for (Owner of HB_Dummy) at HB_Point facing Default building facing degrees
                      • Unit - Set level of Holy Light (Dummy) for (Last created unit) to (Level of Holy Bomb for HB_Caster)
                      • Unit - Order (Last created unit) to Human Paladin - Holy Light HB_Target
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (HB_Target belongs to an enemy of (Owner of HB_Dummy)) Equal to True
                      • ((Unit-type of HB_Target) is Undead) Equal to True
                    • Then - Actions
                      • Unit - Create 1 Holy Light Dummy for (Owner of HB_Dummy) at HB_Point facing Default building facing degrees
                      • Unit - Set level of Holy Light (Dummy) for (Last created unit) to (Custom value of HB_Dummy)
                      • Unit - Order (Last created unit) to Human Paladin - Holy Light HB_Target
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_HB_Point)
                • Else - Actions
          • Set HB_Point = (Position of HB_Dummy)
          • For each (Integer HB_TempInt) from 1 to HB_Shockwaves, do (Actions)
            • Loop - Actions
              • Set HB_Point2 = (HB_Point offset by 0.01 towards ((360.00 / (Real(HB_Shockwaves))) x (Real(HB_TempInt))) degrees)
              • Unit - Create 1 Holy Light Dummy for (Owner of HB_Dummy) at HB_Point facing (Angle from HB_Point to HB_Point2) degrees
              • Unit - Set level of Shockwave (Dummy) for (Last created unit) to (Custom value of HB_Dummy)
              • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave HB_Point2
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Custom script: call RemoveLocation(udg_HB_Point2)
          • Unit - Kill HB_Dummy
          • Custom script: call DestroyGroup(udg_HB_TempGroup)
          • Custom script: call RemoveLocation(udg_HB_Point)
      • Custom script: call DestroyGroup(udg_HB_Group)
because it have a sub ability, it have 2 dummy abilities, 1 hero abilitiy + sub ability. sorry if i make too many requirements ^^'. i'm learning MUI

Changelog:
v1.00 = upload
v1.01 = fixed group leak, removed custom value (i dont use indexing for this because it already use sub skill :( )
v.1.02 = fixed small leak

Keywords:
holy bomb heal light ka boom
Contents

Holy Light Bomb (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 16:59, 31st Jan 2014 BPower: Under no circumstances can a resource modify Unit User Data (Custom value) with the exception of Unit Indexing systems. 09:08, 5th Feb 2014 BPower...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

16:59, 31st Jan 2014
BPower:
Under no circumstances can a resource modify Unit User Data (Custom value) with the exception of Unit Indexing systems.

09:08, 5th Feb 2014
BPower:
http://www.hiveworkshop.com/forums/spells-569/holy-bomb-v1-02-a-247676/?prev=of%3Ddateline%26o%3DASC%26r%3D20%26status%3Dp%26imporder%3D1%26page%3D2#post2481120
Things that leak
 
Do not use this: (leak)
  • Unit Group - Pick every unit in (Units owned by (Owner of HB_Caster) of type Holy Bomb) and do (Actions)
Better never use this action if you can avoid it "Pick all units of type".

Instead, add those units manually per action into unit group:
  • Unit Group - Add Unit to UnitGroup[PlayerNumber]
So maybe you need to create a Unit Group[array] variable, one group for each player, or you can find other solution.
 
  • Like
Reactions: ILH
Level 19
Joined
Mar 18, 2012
Messages
1,716
- Don't use this one it does always leak (Check out Things that leak again)
  • Set HB_Group = (Units owned by (Owner of HB_Caster) of type Holy Bomb)
- You don't have to use so many dummy casters. I recommend to use one per spell cast or even better one per game.
- In general I would like to see, that you code the holy light by yourself instead of using a dummy caster at all:
  • Create a specialeffect at the position of the target.
  • Deal a certain amount of damage to the target.
  • Or heal it, by increasing its life value by the damage amount.
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
- the dummy spell/unit is too much. you can manually heal/damage nearby units using trigger so that dummy spell can be optimized. you also can use only one dummy unit using that DUMMY.mdl. the bomb model, size, color, etc can be configurable in the init/cast trigger
- use one of missile system on this site for the shockwave, because shockwave damage amount need to be configurable
- damage/heal amount need to be configurable
- make your spell more customizable. as example: damage or number of shockwave for each level
- I think, point target is better for the main ability
- fix the follow through time
- the tooltip need to show the ability current level
- hide dummy unit from the map
- you don't need to create one dummy unit per target and per cast. just create one dummy for the whole game.
- store last created unit into a variable.
- store owner of HB_Dummy into a variable
- destroy HB_Point2 inside the loop, you leak it a lot
- move all dummy and the main ability to one category
- you have correctly remove the HB_Point2 leak above but not in the map. I think you forgot to update the map.

just that for now, I might be wrong here :) sorry for that
 
Top