Chain Frost Type of Ability Help (Bouncing Nuke)

LordSaddler1

New Member
Reaction score
4
This ability is supposed to be a bounce ability. If there is a simpler way to do this then please tell me. Anyone know why this ability doesnt flow smoothly? Sometimes it barely works, only shooting the original spear, sometimes it shoots all 10-20 at 1 target from the same location. Its just all messed up.

Code:
Bounding Spear
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Bounding Spear  
    Actions
        Set Bounding_Caster = (Triggering unit)
        Set Bounding_Integer = Bounding_Integer
        Set Bounding_Target = (Target unit of ability being cast)
        Set Bounding_Region = (Region centered at (Position of Bounding_Target) with size (500.00, 500.00))
        Wait until ((Bounding_Target has buff Bounding Spear Target ) Equal to True), checking every 0.20 seconds
        For each (Integer A) from 1 to (5 + (5 x (Level of Bounding Spear   for Bounding_Caster))), do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Bounding_Integer Less than (5 + (5 x (Level of Bounding Spear   for Bounding_Caster)))
                    Then - Actions
                        Unit Group - Pick every unit in (Random 1 units from (Units in Bounding_Region)) and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Bounding_Target Equal to (Picked unit)
                                    Then - Actions
                                        Do nothing
                                    Else - Actions
                                        Unit - Create 1 Casting Dummy for (Owner of Bounding_Caster) at (Position of Bounding_Target) facing Default building facing degrees
                                        Set Bounding_Dummy = (Last created unit)
                                        Set Bounding_Target = (Picked unit)
                                        Set Bounding_Region = (Region centered at (Position of Bounding_Target) with size (500.00, 500.00))
                                        Unit - Add Bounding Spear (Dummy)  to Bounding_Dummy
                                        Unit - Set level of Bounding Spear (Dummy)  for Bounding_Dummy to (Level of Bounding Spear   for Bounding_Caster)
                                        Unit - Order Bounding_Dummy to Human Mountain King - Storm Bolt Bounding_Target
                                        Wait until ((Bounding_Target has buff Bounding Spear Target ) Equal to True), checking every 0.30 seconds
                                        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                                        Unit - Set mana of Bounding_Caster to ((Mana of Bounding_Caster) - (20.00 + (10.00 x (Real((Level of Bounding Spear   for Bounding_Caster))))))
                                        Set Bounding_Integer = (Bounding_Integer + 1)
                    Else - Actions
                        Set Bounding_Integer = 0
 

troyboy

New Member
Reaction score
5
i will post my 'chain death' spell... its the same thing, just change the dummy unit's spell projectile to frost.

Code:
Chain Death
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Chain Death 
    Actions
        Set CSB_Caster = (Triggering unit)
        Set CSB_Target = (Target unit of ability being cast)
        Set Loops = (Level of Chain Death  for CSB_Caster)
        Wait until (((CSB_Target has buff Stunned (Pause)) Equal to True) or ((CSB_Target is dead) Equal to True)), checking every 0.10 seconds
        Set CSB_Target_Loc = (Position of CSB_Target)
        Unit - Create 1 StormBoltDummyUnit for (Owner of CSB_Caster) at CSB_Target_Loc facing Default building facing degrees
        Set Dummy_Unit = (Last created unit)
        Unit - Add Chain Death dummy  to Dummy_Unit
        Unit - Set level of Chain Death dummy  for Dummy_Unit to (Level of Chain Death  for CSB_Caster)
        Custom script:   call RemoveLocation(udg_CSB_Target_Loc)
        For each (Integer A) from 1 to Loops, do (Actions)
            Loop - Actions
                Set Dummy_Loc = (Position of Dummy_Unit)
                Set CSB_Group = (Units within (275.00 + ((Real((Level of Chain Death  for CSB_Caster))) x 50.00)) of Dummy_Loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) belongs to an enemy of (Owner of CSB_Caster)) Equal to True) and ((((Matching 
                Set CSB_Final_Group = (Random 1 units from CSB_Group)
                Unit Group - Pick every unit in CSB_Final_Group and do (Actions)
                    Loop - Actions
                        Set Picked_Unit = (Picked unit)
                        Set Picked_Unit_Loc = (Position of Picked_Unit)
                        Unit - Order Dummy_Unit to Human Mountain King - Storm Bolt Picked_Unit
                Wait until (((Picked_Unit has buff Stunned (Pause)) Equal to True) or ((Picked_Unit is dead) Equal to True)), checking every 0.10 seconds
                Unit - Move Dummy_Unit instantly to Picked_Unit_Loc
                Custom script:   call RemoveLocation(udg_Dummy_Loc)
                Custom script:   call DestroyGroup(udg_CSB_Group)
                Custom script:   call DestroyGroup(udg_CSB_Final_Group)
                Custom script:   call RemoveLocation(udg_Picked_Unit_Loc)
        Unit - Remove Dummy_Unit from the game
 

vypur85

Hibernate
Reaction score
803
Made a Chain Frost. Implementation should be quite easy (tedious~). You just need to copy the triggers and then set up the variables in the Init trigger.

Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set X_Abi_ChainFrost = Chain Frost 
        Set X_Abi_ChainFrost_AcidBomb = Acid Bomb 
        Set X_Abi_ChainFrost_Slow = Slow 
        Set X_Buff_ChainFrost_AcidBomb = (CUSTOM) Chain Frost 
        Set X_UnitType_ChainFrost_Dummy = Dummy
        Set X_Real_ChainFrost_Damage = 100.00
        Set X_Real_ChainFrost_DamagePerLvl = 50.00
        Set X_Real_ChainFrost_AOE = 500.00

Code:
Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to X_Abi_ChainFrost
    Actions
        Set X_Pt_General_1 = (Position of (Triggering unit))
        -------- ======================================================== --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Target unit of ability being cast) is in X_Unitgp_ChainFrost_Store) Equal to False
            Then - Actions
                Unit Group - Add (Target unit of ability being cast) to X_Unitgp_ChainFrost_Store
                Trigger - Add to Damage Taken <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
            Else - Actions
        -------- ======================================================== --------
        Unit - Create 1 X_UnitType_ChainFrost_Dummy for (Owner of (Triggering unit)) at X_Pt_General_1 facing Default building facing degrees
        Unit - Move (Last created unit) instantly to X_Pt_General_1
        Unit - Set the custom value of (Last created unit) to 7
        Unit - Add X_Abi_ChainFrost to (Last created unit)
        Unit - Set level of X_Abi_ChainFrost for (Last created unit) to (Level of X_Abi_ChainFrost for (Triggering unit))
        Unit - Add X_Abi_ChainFrost_AcidBomb to (Last created unit)
        Unit - Add Storm Crow Form to (Last created unit)
        Animation - Change (Last created unit) flying height to (Current flying height of (Triggering unit)) at 0.00
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Target unit of ability being cast)
        Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
        Unit - Hide (Last created unit)
        Custom script:   call RemoveLocation (udg_X_Pt_General_1)

Code:
Damage Taken
    Events
    Conditions
        (Unit-type of (Damage source)) Equal to X_UnitType_ChainFrost_Dummy
        ((Triggering unit) has buff X_Buff_ChainFrost_AcidBomb) Equal to True
    Actions
        Set X_Pt_General_1 = (Position of (Triggering unit))
        -------- ======================================================== --------
        Trigger - Turn off (This trigger)
        Unit - Cause (Damage source) to damage (Triggering unit), dealing (X_Real_ChainFrost_DamagePerLvl + (X_Real_ChainFrost_DamagePerLvl x ((Real((Level of X_Abi_ChainFrost for (Damage source)))) - 1.00))) damage of attack type Spells and damage type Magic
        Trigger - Turn on (This trigger)
        -------- ======================================================== --------
        Unit - Create 1 Footman for (Owner of (Damage source)) at X_Pt_General_1 facing Default building facing degrees
        Unit - Add X_Abi_ChainFrost_Slow to (Last created unit)
        Unit - Order (Last created unit) to Human Sorceress - Slow (Triggering unit)
        Unit - Hide (Last created unit)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        -------- ======================================================== --------
        Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Special Effect - Destroy (Last created special effect)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Damage source)) Greater than 1
            Then - Actions
                Set X_Unitgp_General_1 = (Units within X_Real_ChainFrost_AOE of X_Pt_General_1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Damage source))) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) 
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in X_Unitgp_General_1) Greater than 0
                    Then - Actions
                        Set X_Unit_General_1 = (Random unit from X_Unitgp_General_1)
                        -------- ======================================================== --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (X_Unit_General_1 is in X_Unitgp_ChainFrost_Store) Equal to False
                            Then - Actions
                                Unit Group - Add X_Unit_General_1 to X_Unitgp_ChainFrost_Store
                                Trigger - Add to Damage Taken <gen> the event (Unit - X_Unit_General_1 Takes damage)
                            Else - Actions
                        -------- ======================================================== --------
                        Unit - Create 1 X_UnitType_ChainFrost_Dummy for (Owner of (Damage source)) at X_Pt_General_1 facing Default building facing degrees
                        Unit - Move (Last created unit) instantly to X_Pt_General_1
                        Unit - Set the custom value of (Last created unit) to ((Custom value of (Damage source)) - 1)
                        Unit - Add X_Abi_ChainFrost to (Last created unit)
                        Unit - Set level of X_Abi_ChainFrost for (Last created unit) to (Level of X_Abi_ChainFrost for (Damage source))
                        Unit - Add X_Abi_ChainFrost_AcidBomb to (Last created unit)
                        Unit - Add Storm Crow Form to (Last created unit)
                        Animation - Change (Last created unit) flying height to (Current flying height of X_Unit_General_1) at 0.00
                        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb X_Unit_General_1
                        Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
                        Unit - Hide (Last created unit)
                    Else - Actions
                Custom script:   call DestroyGroup (udg_X_Unitgp_General_1)
            Else - Actions
        Unit - Remove X_Buff_ChainFrost_AcidBomb buff from (Triggering unit)
        Unit - Remove (Damage source) from the game
        Custom script:   call RemoveLocation (udg_X_Pt_General_1)

Note: If I'm not mistaken, there should be a few versions of Chain Frost in this forum... Just made this so that it can be easily linked in future.


Edit:
Wtf... Why is the damn spoiler not working?
 

Attachments

  • Chain Frost.w3x
    21.9 KB · Views: 154
  • Chain Frost v1.01.w3x
    21.9 KB · Views: 156

Jooster

New Member
Reaction score
7
whats the point in setting a variable as triggering unit? wouldnt that just be more work for the computer?
 

LordSaddler1

New Member
Reaction score
4
ok so I pretty much copied Troyboy's and its shooting the initial one, and then shooting two at a random unit rather than like 20 bounces to random people. Posting it. Plz tell me whats wrong with it.

Code:
Bounding Spear
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Bounding Spear  
    Actions
        Set Bounding_Caster = (Triggering unit)
        Set Bounding_Target = (Target unit of ability being cast)
        Set Bounding_Integer = (5 x (Level of Bounding Spear   for Bounding_Caster))
        Wait until (((Bounding_Target has buff Bounding Spear Target ) Equal to True) or ((Bounding_Target is dead) Equal to True)), checking every 0.20 seconds
        Set Bounding_Target_Loc = (Position of Bounding_Target)
        Unit - Create 1 Casting Dummy for (Owner of Bounding_Caster) at Bounding_Target_Loc facing Default building facing degrees
        Set Bounding_Dummy = (Last created unit)
        Unit - Add Bounding Spear (Dummy)  to Bounding_Dummy
        Unit - Set level of Bounding Spear (Dummy)  for Bounding_Dummy to (Level of Bounding Spear   for Bounding_Caster)
        Custom script:   call RemoveLocation (udg_Bounding_Target_Loc)
        For each (Integer A) from 1 to Bounding_Integer, do (Actions)
            Loop - Actions
                Set Bound_Dummy_Loc = (Position of Bounding_Dummy)
                Set Bounding_Group = (Units within 500.00 of Bound_Dummy_Loc matching ((((Triggering unit) is A structure) Not equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Bounding_Caster)) Equal to True) and ((Matching unit) Not equal to Bounding_Target))))
                Set Bounding_Group_Fin = (Random 1 units from Bounding_Group)
                Unit Group - Pick every unit in Bounding_Group_Fin and do (Actions)
                    Loop - Actions
                        Set Bounding_Picked = (Picked unit)
                        Set Bounding_Picked_Loc = (Position of Bounding_Picked)
                        Unit - Order Bounding_Dummy to Human Mountain King - Storm Bolt (Picked unit)
                Wait until (((Bounding_Picked has buff Bounding Spear Target ) Equal to True) or ((Bounding_Picked is dead) Equal to True)), checking every 0.20 seconds
                Unit - Move Bounding_Dummy instantly to Bounding_Picked_Loc
                Custom script:   call RemoveLocation (udg_Bound_Dummy_Loc)
                Custom script:   call DestroyGroup (udg_Bounding_Group)
                Custom script:   call DestroyGroup (udg_Bounding_Group_Fin)
                Custom script:   call RemoveLocation (udg_Bounding_Picked_Loc)
        Unit - Remove Bounding_Dummy from the game
 

darkbeer

Beer is Good!
Reaction score
84
Code:
                Wait until (((Picked_Unit has buff Stunned (Pause)) Equal to True) or ((Picked_Unit is dead) Equal to True)), checking every 0.10 seconds

no picked unit here .....

also it will interfere with any other integerA loop because of the wait.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Omg m8 why don't u use vypur85 spell, it works fine... He made 1,01 version for me. It isn't bugged. +set ur projectile speed of the acid bomb to more so your projectile will fly good. The original speed is very low thats why myb it is bugged
 

vypur85

Hibernate
Reaction score
803
> original speed is very low thats why myb it is bugged

Yeah. This is the main problem. Actually the chance of being bugged is very low. There are only 2 ways of being bugged as far as I know. One is that you cannot have another spell based off Acid Bomb (for periodic damage etc...). Another bug is that if the missile speed is too low, the target unit will have time to escape the 'pursuing' missile. The dummy expiration timer is set to 60 seconds. So the missile MUST hit the target within 60 seconds, or else the 'Killing unit' will not be valid anymore. Those are the only 2 reasons, I think.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top