I would make two suggestions. (I've done this)
When the speech trigger is fired, it passed the text that was spoken to it.
it check this against the mobs trigger.
Lower case both of them before any comparison making the test always case
insensitive.
void lowercase(char *string)
{
while (*string){
*string = tolower(*string);
*string++;
}
}
or:
void lowercase(char *string)
{
int len = strlen(string), i;
for (i=0; i<len; i++)
string[i]=tolower(string[i]);
}
-----Original Message-----
From: Vertigo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 16, 2002 2:27 PM
To: [email protected]
Subject: A mprog code question...
Well, I don't post too often to the list. I provide help as I can but
am a little stumped with this issue. It's not so much a problem as it
is just frustrating.
A builder brought to my attention this evening that when he has a speech
triggered mprog that unless the triggering speech is in all lowercase
the mprog doesn't fire. I think I have whittled down the options to
something in p_act_trigger(). I'd like the mprog trigger to disregard
the string's case when determining whether or not the string matches the
trigger phrase.
Is there an easy fix for this that someone else has run into? Again,
not a massively high priority (as I am sure that the flame war that has
been going on this week establishes priority somehow) but I would like
to correct it for the sanity of my builders.
Thanks guys and gals,
Vertigo
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom