Aller au contenu

Photo

Player Character speaking out loud


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
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);
    }

}

#2
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
Nevermind, I have figured it out now. :-)