Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: Solnoid on May 01, 2006, 06:06:13 am
-
I have tried using many variants on the whole "get input - change skin" If-then statement. Still can't get it to work. Basically, it's determining that the If-Then is false. Here's a sample of the code I'm using:
If InStr(UserSentence, "qz") > 0 Then
GetResponse = "I have changed into my slinky, sexy dress, <username>. How do I look?"
HalCommands = "<HAPFILE>" & "dress.hap" & "</HAPFILE>"
BlockSave=True
GetResponseBlock = True
End If
This is using the default brain. The .HAP file is pointing to the correct file. The location of the If-Then is just after the Initialize Variables section.
The most irritating issue is that this exact same statement worked not 3 hours ago. Then I decided to modify the If-Then to allow for multiple choices. That didn't work, so I deleted the choices, and went back to this.
If I modify the If-Then to = 0, then I get an error saying Illegal assignment "getresponse".
Anyone have any input on this?
-
Solnoid,
I'm also working on changing skins and am having unknown difficulties in Hal6.
Frist I noticed your loading a dress.hap, My method detects a trigger word and sends a loadskin.hap that contains a load dress.jpg.
Your scripting is similar to Troubleshooting facial expressions:
If InStr(UserSentence, "ANGRYMODE") > 0 Then
HalCommands = "<HAPFILE>Angry.hap</HAPFILE>"
GetResponse = "Angry mode set." & VbCrLf
End If
Best of luck
Carl2