| 12-16-2002, 07:40 AM | #1 |
Guest | I need help with something that doesn't seem to be in the normal triggers in the World Editor. Basically, I want the ability to do two things: Give an item to a unit to be dropped upon death Remove an item from a unit that was to be previously dropped on death. For example, normally to have a unit drop an item, you would double-click on the unit, select the 'Items Dropped' tab, and then make sets of items for that unit to drop. I want to be able to remake this functionality with a trigger, allowing you to add items to a unit's 'drop list'. Note that this system needs to work on units, not just heroes who happen to be holding items until they die. The reason I want to find this functionality is because I'm making a map where numerous units are created on the map after it has already started. Because I want some of these units to drop items, I need to be able to give them items after they are created. However, there do not seem to be triggers for giving items to non-hero units for dropping purposes. The only ideas I have come up with are to either make a trigger for each newly created unit to check when it dies and drop an item there, or to create the units before the map starts, in an isolated corner, and then move them one by one to where they need to be placed later. Unfortunately, neither of these ideas works on a mass scale, especially if one is spawning non-countable numbers of enemies with the possibility of some of them dropping items. So does anyone know how to give units droppable items after the map has already started, either through triggers, custom text, or downloadable editors? |
| 12-16-2002, 02:55 PM | #2 |
Event A Unit Owned by Player X dies Conditions none (unless u need one) Actions If (Unit is of Type "Unit Type) Then do If (Random Number between 1-100 is = to 1 then do (Item Create - Random Level X Item) Repeat for more monsters Of course 1 to 100 is 1%. but doing the math with a calculator u can set the 1-100 to be any number to make the % of drop higher. I suggest you resort items that you want to drop. For example: Make all not so good items level 1, medium lvl 2, and so on. And then depending on the monster type. You can set it to drop a random level 1 or 2 or 3 item depending on how hard the monster is. |
