wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 10-05-2009, 02:47 AM   #1
Noobo
User
 
Noobo's Avatar
 
Join Date: Jun 2009
Posts: 11

Noobo has little to show at this moment (0)

Question Problem with dying units

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
Noobo is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-05-2009, 03:11 AM   #2
Anopob
Yay!
 
Anopob's Avatar
 
Join Date: May 2006
Posts: 870

Anopob has a spectacular aura about (120)

Default

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.
__________________
Give +REP to people who help you with things or make good resources.
Better Ways of Requesting For Help - Race Contest #2 WIP Thread (Bone Race)
As of December 1st I have my blue rep. Yay :D
Anopob is offline   Reply With Quote
Old 10-05-2009, 05:02 AM   #3
Noobo
User
 
Noobo's Avatar
 
Join Date: Jun 2009
Posts: 11

Noobo has little to show at this moment (0)

Default

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?
Noobo is offline   Reply With Quote
Old 10-05-2009, 01:52 PM   #4
Dragoon
User
 
Dragoon's Avatar
 
Join Date: Feb 2006
Posts: 215

Dragoon has little to show at this moment (8)

Default

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
__________________
Waiting for Custom Race consest #3
Dragoon is offline   Reply With Quote
Old 10-05-2009, 02:14 PM   #5
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

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.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 10-06-2009, 01:16 AM   #6
Noobo
User
 
Noobo's Avatar
 
Join Date: Jun 2009
Posts: 11

Noobo has little to show at this moment (0)

Default

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 "
Noobo is offline   Reply With Quote
Old 10-06-2009, 02:31 AM   #7
Anopob
Yay!
 
Anopob's Avatar
 
Join Date: May 2006
Posts: 870

Anopob has a spectacular aura about (120)

Default

Integer Comparison.
__________________
Give +REP to people who help you with things or make good resources.
Better Ways of Requesting For Help - Race Contest #2 WIP Thread (Bone Race)
As of December 1st I have my blue rep. Yay :D
Anopob is offline   Reply With Quote
Old 10-06-2009, 03:23 AM   #8
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

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.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 10-07-2009, 12:18 AM   #9
Noobo
User
 
Noobo's Avatar
 
Join Date: Jun 2009
Posts: 11

Noobo has little to show at this moment (0)

Default

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?
Noobo is offline   Reply With Quote
Old 10-07-2009, 01:02 AM   #10
Anopob
Yay!
 
Anopob's Avatar
 
Join Date: May 2006
Posts: 870

Anopob has a spectacular aura about (120)

Default

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.
__________________
Give +REP to people who help you with things or make good resources.
Better Ways of Requesting For Help - Race Contest #2 WIP Thread (Bone Race)
As of December 1st I have my blue rep. Yay :D
Anopob is offline   Reply With Quote
Old 10-08-2009, 12:21 AM   #11
Noobo
User
 
Noobo's Avatar
 
Join Date: Jun 2009
Posts: 11

Noobo has little to show at this moment (0)

Default

A big thankyou to all of you!
Noobo is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:00 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services