Author Topic: Brain Issue - Changing skins  (Read 2575 times)

Solnoid

  • Newbie
  • *
  • Posts: 1
    • View Profile
Brain Issue - Changing skins
« 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?
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Brain Issue - Changing skins
« Reply #1 on: May 03, 2006, 02:36:06 pm »
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