The player initiates an attack against you, you see this skill telegraph.
A delay occurs, length depending on the skill.
The skill comes through. It can hit, miss or be defended against.
I started out using one trigger for each state. So "Stormlance" has a trigger for telegraph, a trigger for hit, a trigger for defended, et cetera.
Lately, however, I've started changing how this works. Now I create one trigger instance, name it for the skill, put every possible trigger into it and use the scripting to determine which of the lines I've actually caught.
This is done with:
I'm curious as to the speed difference, though. I know that the calls to match() are going to slow things down a bit, but has anyone tested to see by how much? I can't be the only person doing something similar.
I'd also like to propose a change to the API, but I'll do that in a separate thread.