| 07-05-2006, 09:10 AM | #1 |
I know this is probably a basic question. But how do I make it so when my peasant kills a destructible, it will have a "Bundle of lumber" added to its inventory, which is only one space. But I want it to be global. So if anyones peasant attacks it, it will add the lumber to thier inventory as well. All players will be able to have peasants. Also what will happen if the one space is full, and the peasant kills another destructible? Will it just not add it, or just place it on the ground, or have an error? |
| 07-05-2006, 09:45 AM | #2 |
I'm not sure if this will work as there might not be a triggering unit, so you'll have to try it >:)
If the peasant has only one slot and it is occupied, nothing will happen. Unless the Bundle of Lumber is used when acquired... |
| 07-05-2006, 09:49 AM | #3 |
Sorry, I've tried that, it doesn't work. There is no target unit in the event of that trigger. It is a genertic event, saying a destructible has died, not was targeted by a unit. |
| 07-05-2006, 04:53 PM | #4 | |
Quote:
Add Conditions (Unit-type of (Killing unit)) Equal to Peasant Um for ease of finding it is a 'unit type comparasion'. The Target in your conditions: Summer Tree Wall. If you have more than one kind of tree, then you will need to use the OR condition (Most likely multiple conditions) Trigger: Since I do not know what kind of trees you have used - click on "Summer Tree Wall" At the bottom of the pop-up you will have Value followed by a string for the tile set (Ashenvale, Barrens, blah) followed by the destructable type from that tile set. Unless you have other units that can destroy/kill trees you might not need the condition "Unit type/peasant" (or how ever it is worded exactly. |
| 07-05-2006, 05:02 PM | #5 |
Or you could do it the non-trigger way. Select all of the trees you want to do this (most likely every single one) and then double click. In the window under "Items Dropped" just select Bundle of Lumber, and that's how your peasants can pick it up. Also note that your peasants actually need to have slots. They don't start out by being able to pick up items. |
| 07-05-2006, 05:38 PM | #6 | |
Quote:
You'lll need to modify bundle of lumber to not be autocasted when it is picked up. |
| 07-05-2006, 06:30 PM | #7 | |
Quote:
|
| 07-05-2006, 06:33 PM | #8 | |
Quote:
And bundles of lumber are automatically used, the can't exactly be given to someone. They are like a rune. You never have them in your inventory. |
| 07-05-2006, 07:23 PM | #9 |
Undead_Lives, Sorry for the lack of explanation on my part. First thing, the tree gets ressurected after it has been killed, so it can be attacked again. Second thing, the bundle of lumber I said, was just for the icon look. The actualy item will do absolutly nothing. So I want it to be put into the units inventory. So again, I want it to be put into the peasants inventory after he has killed the tree. I also have a another question, how do you make a destructible invulerable, without the use of triggers? Sorry if I have so many questions. |
| 07-06-2006, 09:12 PM | #10 |
bump. |
| 07-06-2006, 09:43 PM | #11 |
I myself once tried to achieve this, but the "Destructible Dies" -event counts only 64 first destructibles in a region, so you'd have to create a huge load of regions and triggers to pull this off. |
| 07-06-2006, 09:48 PM | #12 |
There is only 4 Tree's that activate this trigger. |
| 07-07-2006, 12:30 AM | #13 |
I got it. Trigger: Tree
![]() Conditions
Make sure that the peasant has an inventory. Oh and since you said "4" trees activate this trigger, the event should be a specific destructible. And Ironwood Branch because you said it doesn't "do" anything. |
| 07-07-2006, 05:56 AM | #14 |
There seems to be no easy way to find the Peasant who killed the tree. Killing Unit and Triggering Unit return nothing. So, the best I could see is just giving it to the closest peasant, or leaving it on the ground. Or, if you wanted it to be perfect, you could get a whole system going where you check when a Peasant attacks a tree (can you even detect that?), and just store a handle variable to the tree of which Peasant harvested it last. |
