I ran into a bug last night that I have reported, but it got me to thinking about these two events and figured I'd post them here. First, I believe there is a bug(either that or the documentation needs to be updated) in the "Hit Target" event, in that it runs twice. I placed a single dialog in this event and was shown the dialog twice, plus all of my other modifications continually were doubled. The target specified under the spell was the caster, so it should not, in my opinion, have been performed twice.
The reason I was using the "Hit Target" event is that I wanted to make a spell that would do 2 things: increase the caster's max stamina, and then raise the caster's current stamina to the new maximum. Sounds simple, right? Hah!
My first thought was that I could use the stat modifiers to increase the max stamina, and then throw in an Attribute Wizard into the cast event or the hit target event to raise the current stamina. However as I found out the stat modifiers are adjusted after both the "cast" event and the "hit target" events are run. And since Coldstone will not let a player's current statistic(stamina or magic) be set above the maximum for that statistic, I can't just set current stamina to the new maximum.
My next thought was to just throw everything into the "Hit Target" event, since the caster should be affected logically after the spell hits him. So I removed all of the stat modifiers and used attribute wizards to set the max stamina and the current stamina. And in my testing I noticed the above bug where the "Hit Target" event gets run twice.
Which brings me to my final question: If both the "Cast" event and the "Hit Target" event are run preceeding the stat modifiers, is there any information collected/added in the "Hit Target" routine that would differentiate it with the "Cast" event? Ie, is there any reason I would want to use one over the other, not counting the current bug?
------------------
"But soon, soon, soon... the world will be a better place, with meadows and bunnies and fiber optics in every home..."
- Tom Dowdy, Apple Computer