• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help from a complex spell

Level 2
Joined
Jul 20, 2022
Messages
8
I created a spell that shoots a astroid(from inferno). However I want this spell to make an extra effect if it hits a certain target. Example, Jade(my Hero) uses catalyst missile(the Inferno) in an area with enemies and they get damage, but when she does it again but hits a unit that is speific like Tiberium or Gas(from abomination) the CM(Catalyst Missile) upon impact and hits these targets not only just damage them within the aoe but creates a huge explosion to these specific targets. Its like my goal is to make the CM just a astroid that damages enemy when hitted but when a specific target is in range to the impact they explosde viotly(doesnt kill them tho, but nearby the explosion damages entities except the gas or tiberium cause theyre invulnerable anyway). In conclusion: Inferno shoots = Normal, But it shoots and a specific target included within it = Big Explosion.
 
Here's a triggered spell based on what you described.

By default it's a delayed effect which damages enemies around the impact area.
But if you hit certain targets, in my example the Chickens and Frogs, it will create an explosion around them dealing secondary bonus damage.

These "===" and "DEFINE" comments in the Triggers tell you that it's safe to edit whatever is there:
  • -------- ======================================================== --------
  • -------- DEFINE the ... --------
  • Set Variable ...
  • -------- ======================================================== --------
The triggers should be 100% MUI, meaning you can Add the ability to any number of units and cast it any number of times without issues.
 

Attachments

Last edited:
Here's a triggered spell based on what you described.

By default it's a delayed effect which damages enemies around the impact area.
But if you hit certain targets, in my example the Chickens and Frogs, it will create an explosion around them dealing secondary bonus damage.

These "===" and "DEFINE" comments in the Triggers tell you that it's safe to edit whatever is there:
  • -------- ======================================================== --------
  • -------- DEFINE the ... --------
  • Set Variable ...
  • -------- ======================================================== --------
The triggers should be 100% MUI, meaning you can Add the ability to any number of units and cast it any number of times without issues.
I cant open the file. Im using Frozen Throne Warcraft 3 Btw
 
I'm on Frozen Throne as well, but I'm using the latest patch.

Here's the triggers:
  • Custom Inferno Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Custom Inferno
    • Actions
      • Set VariableSet CI_Index = (CI_Index + 1)
      • Set VariableSet CI__Caster[CI_Index] = (Triggering unit)
      • Set VariableSet CI__Point[CI_Index] = (Target point of ability being cast)
      • Set VariableSet CI__Level[CI_Index] = (Level of (Ability being cast) for CI__Caster[CI_Index])
      • -------- --------
      • -------- ======================================================== --------
      • -------- DEFINE the amount of time needed before the missile lands: --------
      • Set VariableSet CI__Delay[CI_Index] = 0.90
      • -------- ======================================================== --------
      • -------- --------
      • -------- ======================================================== --------
      • -------- DEFINE the initial pre-impact special effect: --------
      • Special Effect - Create a special effect at CI__Point[CI_Index] using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- ======================================================== --------
      • -------- --------
      • Trigger - Turn on Custom Inferno Loop <gen>
  • Custom Inferno Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CI_Loop) from 1 to CI_Index, do (Actions)
        • Loop - Actions
          • Set VariableSet CI__Delay[CI_Loop] = (CI__Delay[CI_Loop] - 0.02)
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CI__Delay[CI_Loop] Less than or equal to 0.01
            • Then - Actions
              • -------- The delay is finished, deal damage: --------
              • -------- --------
              • -------- ======================================================== --------
              • -------- DEFINE the main Area of Effect: --------
              • Set VariableSet CI_Real[0] = (200.00 + (75.00 x (Real(CI__Level[CI_Loop]))))
              • -------- --------
              • -------- DEFINE the main Damage: --------
              • Set VariableSet CI_Real[1] = (75.00 + (25.00 x (Real(CI__Level[CI_Loop]))))
              • -------- ======================================================== --------
              • -------- --------
              • -------- ======================================================== --------
              • -------- DEFINE the secondary Area of Effect: --------
              • Set VariableSet CI_Real[2] = 200.00
              • -------- --------
              • -------- DEFINE the secondary Damage: --------
              • Set VariableSet CI_Real[3] = 500.00
              • -------- ======================================================== --------
              • -------- --------
              • -------- ======================================================== --------
              • -------- DEFINE the main impact special effect: --------
              • Special Effect - Create a special effect at CI__Point[CI_Loop] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- ======================================================== --------
              • -------- --------
              • -------- Handle the main targets: --------
              • Set VariableSet CI_Target_Group = (Units within CI_Real[0] of CI__Point[CI_Loop].)
              • Unit Group - Pick every unit in CI_Target_Group and do (Actions)
                • Loop - Actions
                  • Set VariableSet CI_Target = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (CI_Target is alive) Equal to True
                      • (CI_Target belongs to an enemy of (Owner of CI__Caster[CI_Loop]).) Equal to True
                      • (CI_Target is A structure) Equal to False
                      • (CI_Target is invulnerable) Equal to False
                    • Then - Actions
                      • Unit - Cause CI__Caster[CI_Loop] to damage CI_Target, dealing CI_Real[1] damage of attack type Spells and damage type Normal
                      • -------- --------
                      • -------- Check for special targets (ie: gas / tiberium): --------
                      • Trigger - Run Custom Inferno Secondary Targets <gen> (ignoring conditions)
                    • Else - Actions
              • -------- --------
              • Custom script: call RemoveLocation( udg_CI__Point[udg_CI_Loop] )
              • Custom script: call DestroyGroup( udg_CI_Target_Group )
              • -------- --------
              • -------- Remove this instance of the spell (part of the Dynamic Indexing technique): --------
              • Set VariableSet CI__Caster[CI_Loop] = CI__Caster[CI_Index]
              • Set VariableSet CI__Point[CI_Loop] = CI__Point[CI_Index]
              • Set VariableSet CI__Level[CI_Loop] = CI__Level[CI_Index]
              • Set VariableSet CI__Delay[CI_Loop] = CI__Delay[CI_Index]
              • -------- --------
              • Set VariableSet CI_Index = (CI_Index - 1)
              • Set VariableSet CI_Loop = (CI_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CI_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
  • Custom Inferno Secondary Targets
    • Events
    • Conditions
    • Actions
      • -------- Note: This trigger runs from Custom Inferno Loop! --------
      • -------- --------
      • -------- ======================================================== --------
      • -------- Handle the special secondary targets: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of CI_Target) Equal to Chicken
              • (Unit-type of CI_Target) Equal to Frog
        • Then - Actions
          • Set VariableSet CI__Point[0] = (Position of CI_Target)
          • -------- --------
          • -------- ======================================================== --------
          • -------- DEFINE the secondary special effect: --------
          • Special Effect - Create a special effect at CI__Point[0] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- ======================================================== --------
          • -------- --------
          • -------- Deal secondary damage: --------
          • Set VariableSet CI_Second_Group = (Units within CI_Real[2] of CI__Point[0].)
          • Unit Group - Pick every unit in CI_Second_Group and do (Actions)
            • Loop - Actions
              • Set VariableSet CI_Second_Target = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CI_Second_Target is alive) Equal to True
                  • (CI_Second_Target belongs to an enemy of (Owner of CI__Caster[CI_Loop]).) Equal to True
                  • (CI_Second_Target is A structure) Equal to False
                  • (CI_Second_Target is invulnerable) Equal to False
                • Then - Actions
                  • Unit - Cause CI__Caster[CI_Loop] to damage CI_Second_Target, dealing CI_Real[3] damage of attack type Spells and damage type Normal
                • Else - Actions
          • -------- --------
          • Custom script: call RemoveLocation( udg_CI__Point[0] )
          • Custom script: call DestroyGroup( udg_CI_Second_Group )
        • Else - Actions
      • -------- ======================================================== --------
1751902237967.png

The base ability shouldn't do anything. You can use something like Carrion Swarm or Channel.
 
Back
Top