Trigger help? Black Arrow kills don't count as death?

TheAbyss

New Member
Reaction score
2
hi I've been working on a map for a long time now and I have a trigger that has been working up until I created a hero with a modified Black Arrow ability. Here's the trigger:
Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
    • (Alleyway <gen> contains (Position of (Triggering unit))) Equal to True
    • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
    • Wait (7.50 x (Real((Level of (Triggering unit))))) seconds
    • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at (Random point in Alleyway <gen>) facing Default building facing degrees

It's function is to respawn any creep that dies in the Alleyway region in an amount of time that depends on the unit's level and it's been working perfectly until i kill them with the Black Arrow ability activated. It seems if they die by Black Arrow, they do not respawn. I have one of these triggers for each of the 11 creep regions I have. Any idea why this is happening, and how I can fix it? The ability is called Dark bolts, but I'm going to be putting in the original Black Arrow ability soon as well as the Charm ability. And while I'm here, I might as well ask another question: how can i make starfall stun and drop rocks instead of "stars"? Thanks in advance.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
It seems if they die by Black Arrow, they do not respawn. I have one of these triggers for each of the 11 creep regions I have. Any idea why this is happening, and how I can fix it?
Black Arrow does not leave a corpse; 7+ seconds later, the unit will be gone from the game and you won't be able to obtain any information about it (like its position or unit-type) unless you saved it before the wait. Using local variables is one way to do this, and is MUI.

Trigger:
  • [...]
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Alleyway <gen> contains (Position of (Triggering unit))) Equal to True
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • Custom script: local integer dyingtype = 0 //because unit-types are actually integers, in JASS
      • Set TempUnitType = Unit-type of (Triggering unit)
      • Custom script: set dyingtype = udg_TempUnitType
      • Wait (7.50 x (Real((Level of (Triggering unit))))) seconds
      • Custom script: set udg_TempUnitType = dyingtype
      • Unit - Create 1 (TempUnitType) for Neutral Hostile at (Random point in Alleyway <gen>) facing Default building facing degrees
 

TheAbyss

New Member
Reaction score
2
Thanks, it worked perfectly!:D The question is, will it work the same when i put in Charm? And about the starfall... I should problably make a seperate thread for that.
 

Bogrim

y hello thar
Reaction score
154
It won't work for Charm no, as the unit doesn't die. You will have to make a separate spawn trigger for units who change ownership.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top