In the creature OnPerception() event, I see this:
Code: Select all
305 void ACR_CreatureOnPerception()
306 {
307 object oPerceived = GetLastPerceived();
308
309 // apply any effects on the creature
310 ACR_VFXOnPerception(oPerceived, OBJECT_SELF);
311
312 // still call the Obsidian script for AI for now.
313 ExecuteScript("nw_c2_default2", OBJECT_SELF);
314 }
Code: Select all
446 void ACR_VFXOnPerception(object oPerceived, object oPerceiver)
447 {
448 // Load the effect strings
449 string sVisualEffect = GetLocalString(oPerceiver, ON_PERCEPTION_EVENT + EFFECT_VISUAL);
450 string sPhysicalEffect = GetLocalString(oPerceiver, ON_PERCEPTION_EVENT + EFFECT_PHYSICAL);
451 string sDamageEffect = GetLocalString(oPerceiver, ON_PERCEPTION_EVENT + EFFECT_DAMAGE);
452
453 // Apply the effects
454 _applyVisualEffect(sVisualEffect, oPerceived, _applyDamage(sDamageEffect, sPhysicalEffect, oPerceived));
455 }
There is also a similar check OnHeartbeat for creatures, to apply VFX to themselves- presumably that wouldn't need to be happening every heartbeat for every creature, would it?
I may be missing some of the intention of the VFX system here- hopefully you can clarify things somewhat. When I get a bit of time, I'll try some combat comparisons with and without the perception-based and heartbeat VFX to see if it's affecting performance.