| 11-21-2002, 05:16 AM | #1 |
Guest | This probably has a simple answer..... If I have a trigger that spawns units, how do I make it so that those units have a % chance of dropping certain items? I know you can set it with units pre-placed on the map but how do you do it with units created by spawn triggers? |
| 11-21-2002, 06:01 AM | #2 |
Guest | You could do it two ways. First, you could simply create the item for the unit and put it in its inventory. Then set the item to drop on death (both are under the Hero section of actions, I think). Or, you could do this: If (Math - Random Number (Random Integer Between 1 and 100) is Less Than or Equal to (% Chance)) then: And then give the item to the unit, which would make it so it doesn't always definately have it. Or you could do that when the unit dies, and create the item at the spot the unit died so it looks like it was dropped there. Hope this helps! |
