HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problem with dying units

10-05-2009, 02:47 AM#1
Noobo
Hello

I am currently trying to make the trigger editor create an item for a hero when another unit is killed by it.
The problem is the when i make the condition "Grunt is dead equals True" and i make the action "create item and give to hero" nothing happens

Ive also tried "Create item in region" (for action) and "unit grunt equals to dying unit"(for condition),but nothing happens as well

What is wrong with my triggers?
Thanks in advance
10-05-2009, 03:11 AM#2
Anopob
Are you sure Grunt is the unit-type of the unit being killed? Or the specific unit being killed if the grunt you're referring to?

Event is a unit dies... obviously.
10-05-2009, 05:02 AM#3
Noobo
Grunt is a unit variable attached to a unit

Ive also tried to select the actual grunt on the map

Quote:
Event is a unit dies... obviously.
What are u refering to?
10-05-2009, 01:52 PM#4
Dragoon
Quote:
Originally Posted by Noobo
What are u refering to?

He means

Trigger:
Collapse event
unit - unit dies
Collapse conditions
if (dying unit) is equal to (grunt)
Collapse actions
whatever
10-05-2009, 02:14 PM#5
Panto
You don't actually need to know anything about the Dying Unit, if I understand you correctly. Here's how I'd do it in GUI:
Trigger:
Unit Kills
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Level of Custom Ability for (Killing unit)) Greater than 0
((Killing unit) is A Hero) Equal to True
Collapse Actions
Hero - Create Custom Item and give it to (Killing unit)
Perhaps you were using Hero - Give Custom Item instead of Hero - Create Custom Item.
10-06-2009, 01:16 AM#6
Noobo
Nvm I found out what i did wrong, Thanks guys

Panto, i want my hero to cast a spell to kill the grunt... but i cant seem to do it with "hero cast ability" or "unit has specific buff". How do you do your "(Level of Custom Ability for (Killing unit)) Greater than 0 "
10-06-2009, 02:31 AM#7
Anopob
Integer Comparison.
10-06-2009, 03:23 AM#8
Panto
In these early stages, it's definitely worth copy-and-pasting your trigger so we can see how you're approaching the problem.

You can right-click on the top line of a GUI trigger and select "copy as text" to save time.
10-07-2009, 12:18 AM#9
Noobo
Trigger:
Consume 1
Collapse Events
Unit - Grunt 0002 <gen> Dies
Collapse Conditions
(Grunt is dead) Equal to True
((Killing unit) is A Hero) Equal to True
Collapse Actions
Hero - Create Claws of Attack +15 and give it to (Killing unit)

Is there any way of giving the item every time the hero kills a unit of that unitgroup?
10-07-2009, 01:02 AM#10
Anopob
If you want any grunt, just do "A unit dies" as the event, and for the condition "unit type of triggering unit equals to grunt". If you mean a unit group you have made, go to boolean comparison and check if the unit is inside the designated unit group.
10-08-2009, 12:21 AM#11
Noobo
A big thankyou to all of you!