• 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.

[Spell] Star impact spell

Level 12
Joined
Feb 13, 2012
Messages
426
hello i want help on how to do a spell that is based on the Inferno spell that will damage and stun the units in a targeted area but instead of spawning an infernal i want the impact to leave a mana bomb that will after a few second will damage the units around it (also said mana bomb cant by targeted but can by seen )


the spell :


the mana bomb :


the exploration :


or

 
Last edited:
Level 29
Joined
Sep 26, 2009
Messages
2,597
This can be nearly entirely achieved using only object editor data. A very simple trigger is required, because Inferno ability does not play well with summoning a unit with Locust for some reason.

First, create the unit that will represent the actual bomb. Give it the visuals you want, etc. Best would be to base the bomb unit off a ward-like unit, like Orc's Sentry Ward, since that ward does not attack etc.
Give this unit the following two unit abilities:
  • Locust (makes it untargetable)
  • Modified version of 'AOE Damage Upon Death' ability. In the modified version just configure the damage and AoE range of the bomb's explosion.

Second, create a dummy unit. This dummy unit will be summoned by the Inferno ability and will just serve as a way to determine where to create the 'Bomb' unit/ward. You can again base this off Orc's Sentry Ward, but in this case just remove its model and any ability.

Third, configure your Inferno ability to summon the dummy unit. Set it's 'Data - Duration' field to same value as 'Data - Impact Delay' + 0.001. If the duration is lower or equal to impact delay, then the spell will not do any damage nor stun units.

Fourth, create a trigger that will detect death of the dummy unit and creates the actual Bomb unit/ward in its place, giving it a timed life of two seconds.
  • Inferno Spawn Actual Bomb
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to BombDummy
    • Actions
      • Set VariableSet loc = (Position of (Triggering unit))
      • Unit - Create 1 Bomb for (Triggering player) at loc facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_loc)
the 'loc' variable is of type 'Point'.

---
So how this entire thing works is that you cast Inferno at some location. After 'Impact Delay' seconds it will spawn the dummy unit, which will die after 0.001 second, starting the trigger from step #4. The trigger spawns in place of the dummy unit the actual bomb and gives it two second timed life.
The bomb has the Locust ability, making it untargetable/unselectable.
After two seconds, the bomb dies, triggering its own 'AOE Damage Upon Death' ability.

The reason why you have to use dummy unit and you cannot summon the bomb unit directly via Inferno is because when unit with Locust is spawned via Inferno, it can for some reason still be selected/targeted.
 
Level 28
Joined
Dec 3, 2020
Messages
978
This can be nearly entirely achieved using only object editor data. A very simple trigger is required, because Inferno ability does not play well with summoning a unit with Locust for some reason.

First, create the unit that will represent the actual bomb. Give it the visuals you want, etc. Best would be to base the bomb unit off a ward-like unit, like Orc's Sentry Ward, since that ward does not attack etc.
Give this unit the following two unit abilities:
  • Locust (makes it untargetable)
  • Modified version of 'AOE Damage Upon Death' ability. In the modified version just configure the damage and AoE range of the bomb's explosion.

Second, create a dummy unit. This dummy unit will be summoned by the Inferno ability and will just serve as a way to determine where to create the 'Bomb' unit/ward. You can again base this off Orc's Sentry Ward, but in this case just remove its model and any ability.

Third, configure your Inferno ability to summon the dummy unit. Set it's 'Data - Duration' field to same value as 'Data - Impact Delay' + 0.001. If the duration is lower or equal to impact delay, then the spell will not do any damage nor stun units.

Fourth, create a trigger that will detect death of the dummy unit and creates the actual Bomb unit/ward in its place, giving it a timed life of two seconds.
  • Inferno Spawn Actual Bomb
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to BombDummy
    • Actions
      • Set VariableSet loc = (Position of (Triggering unit))
      • Unit - Create 1 Bomb for (Triggering player) at loc facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_loc)
the 'loc' variable is of type 'Point'.

---
So how this entire thing works is that you cast Inferno at some location. After 'Impact Delay' seconds it will spawn the dummy unit, which will die after 0.001 second, starting the trigger from step #4. The trigger spawns in place of the dummy unit the actual bomb and gives it two second timed life.
The bomb has the Locust ability, making it untargetable/unselectable.
After two seconds, the bomb dies, triggering its own 'AOE Damage Upon Death' ability.

The reason why you have to use dummy unit and you cannot summon the bomb unit directly via Inferno is because when unit with Locust is spawned via Inferno, it can for some reason still be selected/targeted.
I love when cool things such as this don't require basically any triggering
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,881
This can be nearly entirely achieved using only object editor data. A very simple trigger is required, because Inferno ability does not play well with summoning a unit with Locust for some reason.
You may be able to simplify it further by directly summoning the Bomb but immediately adding Locust to it:
  • Events
    • Unit - A unit spawns a summoned unit
  • Conditions
    • (Unit-type of (Summoned unit)) Equal to Mana Bomb
  • Actions
    • Unit - Add Locust to (Summoned unit)
    • Unit - Add a 2.00 second Generic expiration timer to (Summoned unit)
I forget if you can add the Locust ability like this.
 
Level 29
Joined
Sep 26, 2009
Messages
2,597
You may be able to simplify it further by directly summoning the Bomb but immediately adding Locust to it:
That does not work for some reason.
Locust cannot be added via GUI action (or rather, the spell cannot be selected from list), but it can of course be done via jass like so:
  • Custom script: call UnitAddAbility(GetSummonedUnit(), 'Aloc')
That does make the unit invulnerable, but still selectable.

I think the issue with Locust occurs because the summoned unit is created at spell cast, but is hidden until 'Impact Delay' seconds have passed.
 
Level 12
Joined
Feb 13, 2012
Messages
426
That does not work for some reason.
Locust cannot be added via GUI action (or rather, the spell cannot be selected from list), but it can of course be done via jass like so:
  • Custom script: call UnitAddAbility(GetSummonedUnit(), 'Aloc')
That does make the unit invulnerable, but still selectable.

I think the issue with Locust occurs because the summoned unit is created at spell cast, but is hidden until 'Impact Delay' seconds have passed.
how do i make the custom script and what Variables should I make ? can some one pleas an example in the world editor pleass ?
 
Last edited:
Level 29
Joined
Sep 26, 2009
Messages
2,597
In my first post, the 'loc' is a 'Point' variable.
Custom script is a GUI action, it can be found under '- General' section in list of trigger Actions. Actually it should be the 3rd option when you open the list of actions.

The below does not require any variable:
  • Custom script: call UnitAddAbility(GetSummonedUnit(), 'Aloc')
The 'GetSummonedUnit()' is equivalent to GUI's '(Summoned unit)' and 'Aloc' is the object code of 'Locust' ability.
 
Top