| 08-27-2002, 08:40 PM | #1 |
Guest | I'm working on an RPG, and the first quest you get is to kill a bunch of bandits. I've got a location enclosing the area they're in, which is a forest. There are also other misc. creeps in said forest. I want a door to open up when all the bandits are dead. How would I go about this? |
| 08-27-2002, 11:11 PM | #2 |
Guest | Well, there's probably an easier way, but heres what I would do. Make a real variable with the number of bandits in that forest. From now on I'll call that variable BanditCount. Event: Specific unit event: <Unit> <dies>. Action: Set Variable - BanditCount = Arithmatic (BanditCount - 1) And then make a trigger like this Event: Variable - BanditCount = 0 Action: Open that door. |
| 08-28-2002, 01:11 AM | #3 |
Guest | that's what I was going to do originally, but specific unit makes you pick a specific instance of a unit... At least, I assumed it meant a specific instance... Didn't occur to me that it just might mean any instance of a specific unit definition... Anyways, what I ended up doing was adding all of them to a unit group and then having the event open the gate when everyone in the group died. |
