Suicide Spell and getting bounty

Yoshii

New Member
Reaction score
74
I made a spell that summon 4 angel on each side of the hero and instantly kill everything in a radius however when i do the spell on the enemy unit it work but i do not gain any xp nor money from the kill.I think its cuz my hero(casting unit) die at same time as the enemy so i do not gain anything, is there a way to fix this?Bounty work when I kill them normaly
Code:
HeavenStrike Level 1
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Level of Heaven Strike  for (Casting unit)) Equal to 1
        (Ability being cast) Equal to Heaven Strike 
    Actions
        Unit - Create 1 Footman for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by (256.00, 0.00)) facing (Position of (Triggering unit))
        Unit - Create 1 Footman for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by (-256.00, 0.00)) facing (Position of (Triggering unit))
        Unit - Create 1 Footman for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by (0.00, 256.00)) facing (Position of (Triggering unit))
        Unit - Create 1 Footman for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by (0.00, -256.00)) facing (Position of (Triggering unit))
        Wait 1.00 seconds
        Unit Group - Pick every unit in (Units within 257.00 of (Position of (Casting unit)) matching (((Matching unit) is A structure) Equal to False)) and do (Actions)
            Loop - Actions
                Unit - Kill (Picked unit)
 
S

Slaughter

Guest
To get XP you need to have an allied unit kill the enemy. Instead of (pick every...) and (kill picked unit), use (pick every...) and this action.

Unit - Create 1 Dummy Attacker for (Owner of (Casting unit)) at (Position of (Picked unit unit) facing (default building facing)
unit - issue order targetting a unit: order (last created unit) to (attack) (picked unit)
unit - add expiration timer: add a 2.00 second expiration timer to (last created unit)

This way the player that cast the spell will be the "owner of 'killing unit'" for triggers and such, and also he will get the kills in his score at the end of the game, and his heros will level and he'll collect bounty and so forth.

The Dummy Attacker should have no attack animation or sound or anything, and use the same model as pathing blockers, and have the ability 'locust,' which makes it un-selectable.

edit: oh and don't forget to make the Dummy Attacker's damage high enough!
 

emjlr3

Change can be a good thing
Reaction score
395
do you want eveyone to die, or just enemies?

if everyone just do damage area, and make the caster be the damaging unit, and make it do like 9999 damage
 
P

Persen

Guest
Or mkae it have some spell like Finger of Death with high damage
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top