Scratch,
This is a wonderful plugin. I really like your programming style: somewhere it looks like mine [
]
The only problem I found is that, after giving correctly some comments every minute, then she gives the "Fine! Be that way" answer and, after that, she stops giving any message.
Maybe it is just your intention to make Hal get so angry that she doesn't speak anymore. But I think that, on the contrary, she should get more and more angry.
Looking at your code:
temperThresh1 = loTemper
temperThresh2 = loTemper + 2
temperThresh3 = loTemper + 3
...
IdleCounter = IdleCounter + 1
If IdleCounter > temperThresh3 Then
Exit Sub
ElseIf IdleCounter > temperThresh2 Then
IdleResponse3 = HalBrain.ChooseSentenceFromFile("insults")
HalMenu.HalCommand "<HAPFILE>angry.hap</HAPFILE>"
HalMenu.HalCommand "<SPEAK>Fine! Be that way. " & IdleResponse3 & "</SPEAK>"
I see that when IdleCounter > temperThresh2 you will get the "Fine! Be that way" message, and at the next loop IdleCounter will be increased by 1 and so it will always pass through the Exit Sub statement.
So I replaced the Exit Sub with the following statements:
IdleResponse3 = HalBrain.ChooseSentenceFromFile("insults")
HalMenu.HalCommand "<HAPFILE>angry2.hap</HAPFILE>"
HalMenu.HalCommand "<SPEAK> " & IdleResponse3 & "</SPEAK>"
The angry2.hap file is a copy of the angry.hap file, where I added this last statement, which makes Hal do a gesture which is internationally understood:
setswitch [switch= the_finger state= a]
Anyway, it's a great plugin, which adds much humanity to Hal. I would be very happy if you published it also in the Software download area of the Virtual Humans Forum.