[Trigger] Conflagration Ability

Level 12
Joined
May 28, 2015
Messages
385
I need help of this ability of mine... Basically what I want for the ability to do is apply a damage per second buff to an enemy. If the enemy dies while under this effect, the effect spreads into nearby enemies to the location of where the killed unit died but its seems its not working.

[trigger=]
Conflagration
Events
Unit - A unit dies
Conditions
(Dying unit) has buff Conflagration equal to True
Actions
Set Temp_DyingLoc = Position of (Dying Unit)
Set Temp_UnitGroup = Pick every unit within 250 of Temp_DyingLoc
Unit Group - Pick every unit within Temp_UnitGroup
If - Conditions
Level of Conflagration for (Triggering unit) is equal to 1
Then - Actions
Unit - Create 1 dummy for Owner of (Triggering unit) at Temp_DyingLoc facing Default building facing degrees
Unit - Add conflagration dummy to Last Created unit
Unit - Set level of conflagration ability to 1
Unit - Order Last created unit to Acid Bomb Picked unit
Unit - Add a 10 second Generic timer to Last created unit
Custom script: call RemoveLocation(udg_Temp_TargetLoc)
Else - Actions
Custom script: call DestroyGroup(udg_Temp_UnitGroup)[/trigger]
 
Level 10
Joined
Apr 4, 2010
Messages
509
When a unit dies, it has no buff. You need to add the unit to a group and check if dying unit is in the group.
EDIT: You can base your spell off of Parasite and use the Event Unit Spawns Summoned Unit. Remove the summoned unit from the game, then do actions at position of summoned unit.
 
Level 2
Joined
Nov 6, 2015
Messages
9
There is also a location leak inside your trigger:
When the level of Conflagration for (Triggering unit) is else than 1, Temp_DyingLoc doesn't get destroyed.
 
Level 12
Joined
May 28, 2015
Messages
385
There is also a location leak inside your trigger:
When the level of Conflagration for (Triggering unit) is else than 1, Temp_DyingLoc doesn't get destroyed.

Oh that's just an example.. It has 4 levels actually.

When a unit dies, it has no buff. You need to add the unit to a group and check if dying unit is in the group.
EDIT: You can base your spell off of Parasite and use the Event Unit Spawns Summoned Unit. Remove the summoned unit from the game, then do actions at position of summoned unit.

Can you show me the trigger?
 
Level 10
Joined
Apr 4, 2010
Messages
509
I made the spell for you. It's like 10 lines of code, super easy and it looks cool too.
attachment.php

  • Spell
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Dummy
    • Actions
      • Set Loc = (Position of (Summoned unit))
      • Set Player = (Owner of (Summoned unit))
      • Unit - Remove (Summoned unit) from the game
      • Unit - Create 1 Dummy for Player at Loc facing Default building facing degrees
      • Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)
      • Set Group = (Units within 300.00 of Loc matching (((Matching unit) belongs to an enemy of Player) Equal to True))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Unit - Order (Last created unit) to Neutral - Parasite (Picked unit)
      • Custom script: call RemoveLocation (udg_Loc)
      • Custom script: call DestroyGroup (udg_Group)
 

Attachments

  • Spell.gif
    Spell.gif
    3.7 MB · Views: 143
  • Spreading Poison.w3x
    23.9 KB · Views: 95
Top