Ai Dreams Forum
Chatbots => General Chatbots and Software => UltraHal => Topic started by: ramccoid on December 06, 2006, 11:21:39 pm
-
I have tried to change a character skin with a hap animation, but HAL will only perform the animation. How can I get HAL to perform the skin change with the animation together?
-
Some more info would help getting a response, try posting the code you are using.
-
Hi,
Below is the code I am using to achieve the effect I am trying to get, but HAL will only perform the HAP animation without changing the body skin.
raUserSentence = LCase(UserSentence)
anifile = ""
If InStr(raUserSentence, " dress 1 ") <> 0 Then
HalCommands = "<HAPTEXT>" & "\settexture [tex= Bodyskins/wear1.jpg]</HAPTEXT>"
BlockSave=True
GetResponseBlock = True
anifile = "TurnAround.hap"
End If
The the next bit of code makes the animation work from the information that is gathered from the previous and that's all that happens. There isn't any skin change at all.
If anifile <> "" Then
HalCommands = "<HAPFILE>" & anifile & "</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If
I would be very grateful if you could tell me where I am going wrong.
Thanks
-
Is this Hal 5 ?
I think you need to change the last bit of code to:
HalCommands = HalCommands & "<HAPFILE>" & anifile & "</HAPFILE>"
The way the code reads, you are setting Halcommands in the first bit of code, but then replacing it with something else in the next section of code. I think you can string multiple <HAPFILE> and <HAPLINE> commands together so try the above.
Note that HalCommands isn't a direct command from the brain file to the Haptek player, it is actually a variable that is passed to the main UltraHal program. So it's not like you tap in a HalCommand and it happens at that point in the program.
-
Thanks very much that works perfectly. I am using HAL6 and I did think 'HalCommands' was a direct command. That's brilliant, it's great to see HAL working the way I wanted it to. Thanks again for all your help, it was well appreciated.
-
You're welcome, glad it worked :smiley