OnSpawn
void main()
{
SetListening(OBJECT_SELF, TRUE);
SetListenPattern(OBJECT_SELF, "**", 69);
}
OnConversation
void main()
{
int nMatch = GetListenPatternNumber(); // *
if (nMatch != 69) {return;} // *
object oPC = GetPCSpeaker();
string sHeard = GetMatchedSubstring(0);
...
}
*Are these two lines even necessary, as the string that was typed would be checked later if it matches something?
oPC and sHeard return OBJECT_INVALID and ""
oPC is obviously supposed to be the PC who said something and sHeard the string that was typed.
Any help appreciated...
Modifié par Xardex, 18 avril 2011 - 01:34 .





Retour en haut






