HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

KillUnit() and no exp.

07-05-2007, 12:06 AM#1
civilr
Hey, sorry about the seriously dumb question but I'm having a mental block right now and I want to finish this ability.

I have a dummy skill that my hero will learn (10 levels) and it gives a chance to kill a unit on attack. I have the trigger set up to check what level the skill is and random a number between 1-100 I then tell it to kill the attacked unit if it falls within the percent.

It works perfect but the hero gets no exp. when he kills the unit and that is understandable because the KillUnit() function I assume would be as if the map is killing the unit itself.

Is there any way I can just terminate this unit for a player (say Red, and thus he would receive whatever exp. and bounty). I was thinking critical strike with massive damage but the problem lies with my hero, he does line splash damage and the second I choose critical strike my hero no longer does splash damage.
07-05-2007, 12:31 AM#2
sas_Skorpion
Try doing like this ... when the spell activated (the random kill function) make it do this:

Trigger:
Random Kill Unit
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Random integer number between 1 and 100) Less than or equal to 15 (this is equal to 15% chance)
(Level of (Your spell) for (Attacking unit)) Greater than 0
Collapse Actions
Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius 500.00(range of splash damage) at (Position of (Attacked unit)), dealing 100000.00 damage of attack type Hero and damage type Normal
07-05-2007, 01:20 AM#3
Ammorth
Why not just get the unit to damage the unit directly?

It was also reported that Order Unit to Damage Radius causes Macs to crash.
07-05-2007, 01:58 AM#4
civilr
Sorry for the late reply but I was away doing some things. I like your idea Skorpion, I had never really seen or had the need to use that function so I didn't even know it existed.

Though I don't want the spell to splash damage so I will damage directly as Ammorth mentioned. Thank you both, +reps all around.

Sincerely,
...
07-05-2007, 02:21 AM#5
Vexorian
Quote:
It was also reported that Order Unit to Damage Radius causes Macs to crash.
hmm that would be a good reason to stop using macs for wc3.

But I guess that at least the function that does single damage to one unit works correctly? Else we would have too much Mac users complaining about how DOTA doesn't work on their computers..
07-05-2007, 06:00 AM#6
Pyrogasm
Quote:
Originally Posted by Ammorth
It was also reported that Order Unit to Damage Radius causes Macs to crash.
Blasphemous. I'll test right now.

EDIT:

WTF? The following trigger does not damage anything!:
Trigger:
Untitled Trigger 001
Collapse Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Collapse Actions
Unit - Cause Tauren Chieftain 0015 <gen> to damage circular area after 0.00 seconds of radius 2000.00 at (Position of Tauren Chieftain 0015 <gen>), dealing 250.00 damage of attack type Spells and damage type Normal
Cinematic - Ping minimap for (All players) at (Position of Tauren Chieftain 0015 <gen>) for 1.00 seconds
Game - Display to (All players) the text: Damaged.
The text and ping work fine... but no damage occurs.
07-05-2007, 01:28 PM#7
Vexorian
there's no reason at all to use that function anyways, pick every unit in range + damage single target is logically equivalent, but you can add specific conditions as to what unit to damage which is the only practical way of doing that...

And I once heard the circle damage function requires some specific attacktype/damage type combo.