• 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] Breath of Parisite Spell

Status
Not open for further replies.
Level 3
Joined
Jun 17, 2012
Messages
46
My map has a spell akin to breath of fire, but i want units that die within 20 seconds of being hit by the spell to turn into skeletons. Any help would be great.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Breath of Fire has a secondary fire effect that remains as a buff dealing damage over time. Make that effect deal X amount of damage/sec, last 20 seconds (all that in the OE) and, with triggers, check if a Dying Unit has that buff, if it's true, create the skeleton.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you apply a buff of Orb of Darkness to that unit, it will create a skeleton once it's dead, the hard part is, how to apply it ?

Don't tell me you're gonna order invisible dummy unit to attack those affected units (to apply the Orb of Darkness buff, one must simply lands an attack first).

Sadly, buffs can be destroyed by call UnitRemoveAbility but can't be added by call UnitAddAbility.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
When the unit is damaged by the BOF add it to a UnitGroup (BOFGroup) and every 0.1 seconds check if the unit is alive, and save +0.1 in the Unit handle ID in a Hashtable as some kind of timer. If the unit isn't alive, create the skeleton. If the timer reaches the duration of your buff, remove the buff and remove the unit from the group, clean the hashtable, and check if there's any other unit in the BOFGroup, if there is no unit, turn off the periodic trigger.
 
Level 3
Joined
Jun 17, 2012
Messages
46
Spartipilo the problem with the breath of fire buff is that it only gets applied if drunken brawler is applied as well. I tried that already but the buff is only applied for a split-second, just long enough to deal damage via triggers. Also I'm not sure how to use Hashtables, you think you can put your idea into trigger text or whatever?

defskull, hi again lol uhh im not sure how I would apply the buff, like you said you can remove buffs but not add them. I could try to give the hit units a spell that contains that buff but I'm not sure if it would work because it wouldn't be the orb of darkness spell.

noob, I'm not sure if that would work, it seems like a lot of work to make the dummy hit EVERYONE.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'll do it for you without a buff. The only thing you have to do is detect when the units are hit by the Breath of Fire (I don't know how to do that). I'll edit this post to post the triggers. I'll do it in easy explained JASS.

<< EDIT >>

The only way to detect damage coming from a spell that isn't instant, is triggering it and ALL your spells damage, so any damage that is not triggered comes from an attack. Wc3 just detects the UNIT DamageSource, but not the SPELL/ATTACK/MELEE/RANGE Damage.

<< EDIT >>

Since you have to do some work tiggering all your spells damage, after that, this is fairly easy. Just create a dummy to cast Parasite on the unit damaged by the Breath of Fire =)
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
That you have to detect when the units are damaged BY and only BY your BOF Ability to do the Parasite thing.

Wc3 only allows detecting Damaged Unit and Damage Source, but not by what kind of ability/attack the damage came. That's what you have to do manually.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
When you detect a unit being damaged by the BOF you createa 1 dummy at the position of that unit, order the dummy to cast parasite on the damaged unit, and then remove the dummy. If you hit 100 units, the game will create 100 dummies. If you hit 1, the game will create 1.
 
Level 14
Joined
May 22, 2010
Messages
362
Instead if triggering all spell damage of all of his spell, cant he simply make a dummy BOF spell, when cast a dummy unit will be created with the real BOF spell and cast it at the target location. Now he can detect the units that are hit by the BOF by setting a condition damage source = BOF dummy caster.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
That's true. Really good suggestion WhiteDeath

<< EDIT >>

Requires Weep's GUI Friendly Damage Detection System

  • BOF
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourBreathOfParasiteAbility
    • Actions
      • Set Point = (Position of (Triggering unit))
      • Unit - Create 1 BreathOfParasiteDummy for (Triggering player) at Point facing Default building facing degrees
      • Set Unit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to Unit
      • Custom script: call RemoveLocation(udg_Point)
      • Set Point = (Target point of ability being cast)
      • Unit - Order Unit to Neutral Pandaren Brewmaster - Breath Of Fire Point
      • Custom script: call RemoveLocation(udg_Point)
  • Parasite Cast
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Unit-type of GDD_DamageSource) Equal to BreathOfParasiteDummy
    • Actions
      • Set Point = (Position of GDD_DamagedUnit)
      • Unit - Create 1 ParasiteCaster for (Owner of GDD_DamageSource) at Point facing Default building facing degrees
      • Set Unit = (Last created unit)
      • Unit - Order Unit to Neutral - Parasite GDD_DamagedUnit
      • Unit - Add a 0.50 second Generic expiration timer to Unit
      • Custom script: call RemoveLocation(udg_Point)
 
Last edited:
Level 3
Joined
Jun 17, 2012
Messages
46
Hey I tried it and only the last person to be hit by BOF got hit by parasite.

EDIT: Just realized you said I needed something else, give me a few.
 
Dying unit don't have buffs, it's a Warcraft III glitch Condition.

Try it if you don't believe it.

Unit - Unit Has Specific Buff condition does not work with Unit - A unit Dies Event.

Make a timer to check units with that buff, and when the hitpoints are below X then instantly kill it creating a skeleton after it dies.
 
Status
Not open for further replies.
Top