[Spell Request] Cone spell

Nazgul

New Member
Reaction score
1
[Spell Request/Help] Cone spell

I would like a spell, if possible that is based off Breath of Frost and MUI. I need it to be triggered so I can mess around with the damage values. Basically, I want it to be damage over time only, dealing damage based on how much HP the caster is missing. I was on my way of making one that is MUI when I got stuck at forming groups that are caught in different cones (from Hero1, Hero2).

If you don't feel like making such a spell, I'd really appreciate some pointers on how to fix my version instead.

Trigger:
  • Ignite Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ignite
    • Actions
      • Unit Group - Add (Triggering unit) to Ignite_CasterGroup
      • Unit - Add Custom Value to (Triggering unit)
      • Unit - Set level of Custom Value for (Triggering unit) to 1
      • Trigger - Turn on Ignite DoT <gen>

Trigger:
  • Ignite DoT
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ignite_CasterGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in Ignite_CasterGroup and do (Actions)
            • Loop - Actions
              • Unit - Set level of Custom Value for (Picked unit) to ((Level of Custom Value for (Picked unit)) + 1)
              • Set Ignite_Lvl = (Level of Ignite for (Picked unit))
              • Set Ignite_Damage = (((20.00 + (Real(Ignite_Lvl))) / 100.00) x ((Max life of (Picked unit)) - (Life of (Picked unit))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Custom Value for (Picked unit)) Less than 6
                • Then - Actions
                  • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) has buff Ignite buff) Equal to True
                        • Then - Actions
                          • Unit - Cause (Picked unit) to damage (Picked unit), dealing Ignite_Damage damage of attack type Spells and damage type Normal
                        • Else - Actions
                          • Do nothing
                • Else - Actions
                  • Unit Group - Remove (Picked unit) from Ignite_CasterGroup
 

hgkjfhfdsj

Active Member
Reaction score
55
Trigger:
  • Unit - Cause (Picked unit) to damage (Picked unit), dealing Ignite_Damage damage of attack type Spells and damage type Normal

- Picked unit in second group overwrites first. >> perhaps set first picked unit as some unit variable

MUI when I got stuck at forming groups that are caught in different cones
>> i dont quite get you there..
 

Nazgul

New Member
Reaction score
1
I know it overwrites it and it works just fine as long as I cast this spell with the same Hero over and over again.

Problem is when this hero is picked twice, second guy does A LOT more damage if he casts the same spell on the same unit(s). However, if it were to cast on different units then it would still be the same. In case you haven't noticed my trigger picks all units in playable map area that have the buff, meaning that 2x casts from different heroes will screw things up. :p

EDIT: I've done some changes and it seems to work, but I have a feeling I'm not exactly there yet. These are the new triggers:

Trigger:
  • Ignite Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ignite
    • Actions
      • Unit Group - Add (Triggering unit) to Ignite_CasterGroup
      • Unit - Add Custom Value to (Triggering unit)
      • Unit - Set level of Custom Value for (Triggering unit) to 1
      • Trigger - Turn on Ignite DoT <gen>


Trigger:
  • Ignite DoT
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Ignite buff) Equal to True
            • Then - Actions
              • Unit Group - Add (Picked unit) to Ignite_UnitGroup[(Level of Custom Value for (Triggering unit))]
              • Set Ignite_Units = (Ignite_Units + 1)
            • Else - Actions
              • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ignite_CasterGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in Ignite_CasterGroup and do (Actions)
            • Loop - Actions
              • Unit - Set level of Custom Value for (Picked unit) to ((Level of Custom Value for (Picked unit)) + 1)
              • Set Ignite_Lvl = (Level of Ignite for (Picked unit))
              • Set Ignite_Damage = (((20.00 + (Real(Ignite_Lvl))) / 100.00) x ((Max life of (Picked unit)) - (Life of (Picked unit))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Custom Value for (Picked unit)) Less than 6
                • Then - Actions
                  • For each (Integer A) from 1 to Ignite_Units, do (Actions)
                    • Loop - Actions
                      • Set Ignite_RndUnit = (Random unit from Ignite_UnitGroup[(Level of Custom Value for (Picked unit))])
                      • Unit - Cause (Picked unit) to damage Ignite_RndUnit, dealing Ignite_Damage damage of attack type Spells and damage type Normal
                      • Unit Group - Remove Ignite_RndUnit from Ignite_UnitGroup[(Level of Custom Value for (Picked unit))]
                • Else - Actions
                  • Unit Group - Remove (Picked unit) from Ignite_CasterGroup
 

foodflare

You can change this now in User CP.
Reaction score
32
Trigger:
  • Ignite Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ignite
    • Actions
      • Set NumoCasters = (NumoCasters + 1)
      • Hashtable - Save Handle Of(Triggering unit) as NumoCasters of 1 in IgniteHT
      • Hashtable - Save 1 as NumoCasters of 2 in IgniteHT
      • Hashtable - Save (Real((Level of Ignite for (Triggering unit)))) as NumoCasters of 3 in IgniteHT
      • Hashtable - Save Handle Of(Units in (Playable map area) matching (((Matching unit) has buff Ignite buff) Equal to True)) as NumoCasters of 4 in IgniteHT
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NumoCasters Less than or equal to 1
        • Then - Actions
          • For each (Integer A) from 1 to (NumoCasters - 1), do (Actions)
            • Loop - Actions
              • Unit Group - Pick every unit in (Load NumoCasters of 4 in IgniteHT) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is in (Load (Integer A) of 4 in IgniteHT)) Equal to True
                    • Then - Actions
                      • Unit Group - Remove (Picked unit) from (Load NumoCasters of 4 in IgniteHT)
                    • Else - Actions
        • Else - Actions
        • Trigger - Turn on Ignite DoT <gen>

in order right after setting NumoCasters
Save Unit Handle
Save Integer
Save Real
Save Group Handle
Trigger:
  • Ignite DoT
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NumoCasters Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • For each (Integer A) from 1 to NumoCasters, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load (Integer A) of 2 from IgniteHT) Less than 6
                • Then - Actions
                  • Hashtable - Save ((Load (Integer A) of 2 from IgniteHT) + 1) as (Integer A) of 2 in IgniteHT
                  • Unit Group - Pick every unit in (Load (Integer A) of 4 in IgniteHT) and do (Actions)
                    • Loop - Actions
                      • Unit - Cause (Load (Integer A) of 1 in IgniteHT) to damage (Picked unit), dealing (((20.00 + (Load (Integer A) of 3 from IgniteHT)) / 100.00) x ((Max life of (Load (Integer A) of 1 in IgniteHT)) - (Life of (Load (Integer A) of 1 in IgniteHT)))) damage of attack type Spells and damage type Normal
                • Else - Actions
                  • Hashtable - Clear all child hashtables of child (Integer A) in IgniteHT
                  • Hashtable - Save Handle Of(Load NumoCasters of 1 in IgniteHT) as (Integer A) of 1 in IgniteHT
                  • Hashtable - Save (Load NumoCasters of 2 from IgniteHT) as (Integer A) of 2 in IgniteHT
                  • Hashtable - Save (Load NumoCasters of 3 from IgniteHT) as (Integer A) of 3 in IgniteHT
                  • Hashtable - Save Handle Of(Load NumoCasters of 4 in IgniteHT) as (Integer A) of 4 in IgniteHT
                  • Set NumoCasters = (NumoCasters - 1)


in map initialization put

Trigger:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set IgniteHT = (Last created hashtable)


where, IgniteHT is a hashtable variable, NumoCasters is an integer, and the red stuff tells general things that you might not know....(i'm no expert on hashtables so I might be completely FAIL)
 

fogrn

New Member
Reaction score
2
The problem I foresee with both of those is if a first breath is cast, then while the dot is still up, a 2nd breath is cast, then all the units that still had the buff from the first breath are now also in unit group with the units that were hit by the second breath, even if they didn't get hit by the second breath.
 

foodflare

You can change this now in User CP.
Reaction score
32
The problem I foresee with both of those is if a first breath is cast, then while the dot is still up, a 2nd breath is cast, then all the units that still had the buff from the first breath are now also in unit group with the units that were hit by the second breath, even if they didn't get hit by the second breath.

actually, mine doesnt have that happen, mine just has it so that if they're already under the effect they won't be able to be affected by it until they're no longer under the previous effect
 

Nazgul

New Member
Reaction score
1
Tried it just now, it doesn't damage the enemy unit at all. I cannot think of any solution because I've never used Hashtables before. However, I'd like an input on my last trigger post because it seems I'm really close to getting it to work. As a matter of fact it might work. Just need a confirmation. Or ofc, an alternative solution. ;D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top