| 10-05-2009, 02:47 AM | #1 |
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 |
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 | |
Grunt is a unit variable attached to a unit Ive also tried to select the actual grunt on the map Quote:
|
| 10-05-2009, 01:52 PM | #4 |
| 10-05-2009, 02:14 PM | #5 |
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:Perhaps you were using Hero - Give Custom Item instead of Hero - Create Custom Item. |
| 10-06-2009, 01:16 AM | #6 |
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 |
Integer Comparison. |
| 10-06-2009, 03:23 AM | #8 |
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 |
| 10-07-2009, 01:02 AM | #10 |
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 |
A big thankyou to all of you! |
