Author Topic: Player Character speaking out loud  (Read 306 times)

Legacy_Bazilbrush

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
Player Character speaking out loud
« on: July 02, 2011, 04:40:51 pm »


               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);
    }

}
               
               

               
            

Legacy_Bazilbrush

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
Player Character speaking out loud
« Reply #1 on: July 03, 2011, 01:07:58 am »


               Nevermind, I have figured it out now. :-)