| 12-06-2006, 12:26 AM | #1 |
Ok, there's a way to dynamically add an event to a trigger, but is there a way (with custom script(s), 'cause I don't really know JASS) to remove an event from a trigger or clear all events from a trigger? Also, if I use a trigger to add an event to a trigger every time some action happens, will the action be added multiple times on top of itself as a new event, or will the game realize that the event is already there and won't add it. Question 2: For the event "Unit - A unit takes damage", is there a way to check for the type of damage (physical/spell) or check to see if the source was a spell? |
| 12-06-2006, 12:46 AM | #2 | |
Quote:
1. I don't think there is a function to remove an event from a trigger. Also, I'm not entirely sure, but I think the same event might be able to be added twice. If you kept adding more and move events, it would use up more and more memory, but I heard somewhere that if you destroy a trigger, it frees up the memory used by the events, but I'm not entirely sure on that. 2. There is no 100% way to be sure of this. Most systems add an orb ability to each unit so when a unit is damaged, it checks the unit to see if it has the buff from that orb ability and if it does, assumes the unit took damage from an attack and otherwise assumes the damage source was a spell. |
| 12-06-2006, 01:12 AM | #3 | ||
Quote:
Quote:
|
| 12-06-2006, 01:15 AM | #4 | |
Quote:
If you do it this way, you'll need to make sure units don't have some other abilities with orb effects which could possibly (I haven't tested this) mess the system up and cause the Frost Orb buff not to appear. That's why I said the system wasn't 100% reliable. |
| 12-06-2006, 01:22 AM | #5 | ||
It is 100% reliable in detection, which is what I thought you meant by your response: Quote:
Quote:
|
