To completely finish hijacking Surek's thread...
@WhiZard
No, SignalEvent gets resolved within the script (as does the OnDamaged script if applying damage without a delay).
This is not born out by my testing for general SignalEvent calls. I did not have a lot of time so did not explicitly test the EffectDamage path.
I did two tests. The first was simply having a lever onused event something like this :
void main() {
SendMessageToPC(GetFirstPC(), "Starting signal event");
SignalEvent(GetObjectByTag("TESTME1"), EventUserDefined(501));
SendMessageToPC(GetFirstPC(), "Done with signal event.");
}
The userdefined event handler on TESTME1 just prints a message saying it got an event.
The results were:
Starting signal event
Done with signal event
TESTME1 got event
If it worked the way you described the "TESTME1 got event" line would have been in the middle.
Test 2 was similar but I had TESTME1 send the event to TESTME2 when it got the first event. TESTME2 then sent it right back, creating a loop of two objects sending each other events as fast as possible, no delays. If this was all happening it the context of the original script this loop would have stopped with a TMI. Instead the CPU was pegged and the game completely stopped until I killed nwmain.
Interestingly in this case none of the messages printed. It must have tied up the server before the client side could do anything. This was single player so it was all the same process.