I am using a script to create fire damage in an area. What I would like to do is to be able to have the player speak out loud when they experience the damage. Any ideas on how I can do this? Here is the script I am using.
void ApplyEffect(object oPC, object oArea)
{
if (GetArea(oPC) == oArea)
{
effect eEffect = EffectDamage(2, DAMAGE_TYPE_FIRE, DAMAGE_POWER_NORMAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);
}
else return;
DelayCommand(9.0, ApplyEffect(oPC, oArea));
}
void main()
{
object oPC = GetEnteringObject();
object oArea = GetArea(OBJECT_SELF);
if (!GetIsPC(oPC))
{
if (GetIsPC(GetMaster(oPC))) ApplyEffect(oPC, oArea);
}
else
{
ApplyEffect(oPC, oArea);
}
}