how do I give a killed creep to killing player?

meliotor

New Member
Reaction score
0
I understand that this needs to be done with a trigger (or a few). I also think I am pretty good with triggers (never jass). I just need some help with this.

Explanation:
I have a map with two groups of heroes battling. The idea is they get units by killing creeps. For example when the creep dies the killing player would receive gold (just a bounty) but also the creep would revive its self with the player controlling it. That way if the player killed enough strong creeps he would have an army.

Problem:
I can't seem to figure out how to make the trigger (excluding bounty). What I had made was an event where the unit dies, and then on death create another creep of the same kind and give it to killing unit. But because the killing unit wasn't in the event I don't know how to give the revived creep to the player.

Any help would be greatly appreciated.
If you could either show me a trigger that would work or a event/condition/action that can find the killing unit.
I think I may have to make a unit group but I'm not sure how i would do this.
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
unit dies.

action
replace triggering unit with unit type of triggering unit.
change ownership of last replaced unit to owner of the killing unit.


you know... there i don't see a event such as a unit kills.
 

minikrampan

Ultra Cool Member
Reaction score
28
Event
A unit dies

Condition
Dying units is no equal to a hero (or something)

action
Create one unit-type of dying unit for Owner of killing unit
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> because the killing unit wasn't in the event

"a unit dies" does set that one though...


Event:
- A unit owned by Neutral Hostile dies
Conditions:
- (Killing unit) not equal to "No unit"
Actions:
- Set Point = Position of (Triggering unit)
- Unit - Create 1 (Unit type of (Triggering unit)) for (Owner of (Killing unit)) at Point facing Default
- Custom script: call RemoveLocation( udg_Point )
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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