dupa

Author Topic: problem with hap files in Hal  (Read 10874 times)

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
problem with hap files in Hal
« on: December 06, 2009, 03:00:57 pm »
I've been trying to control the body_female.htr in Hal using trigger phrases and hap files with the HapSwap plugin. But i'm having problems getting some hap files to work correctly in Hal, although they do work in the haptek console. A simple example ...

#Haptek  Version= 2.00 Name= walk.hap   HapType= script FileType= text
## world standard

setswitch [switch= walk3 state= 1]
\clock [t= 10] \setswitch [switch= walk3 state= off]

This works fine in the haptek console. But in Hal, the character never stops walking. Does the "clock" command not work in Hal? Or is there something wrong with this hap file? Can anyone give me advice on how to control timing commands in Hal?

Regards
Davy
 

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
problem with hap files in Hal
« Reply #1 on: December 06, 2009, 03:24:36 pm »
I think Snowman discovered that timed scripts don't work with Hal.  Hopefully he will pop in to confirm this.

Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
problem with hap files in Hal
« Reply #2 on: December 06, 2009, 08:52:10 pm »

Hal will usually switch moods within 10 seconds and will break the timed hap.
You can use another trigger word to stop walking if you want.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
problem with hap files in Hal
« Reply #3 on: December 06, 2009, 11:45:51 pm »
All I can do is confirm what Freddy said. I tried all kinds of things but I Hal wouldn't let me use the timer function. Single Haptek commands seem to work fine.
Live long and prosper or die trying.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
problem with hap files in Hal
« Reply #4 on: December 06, 2009, 11:50:53 pm »
Oh, and for those who care, I'm sorry I haven't made the generic Hapswap file yet, I sometimes get distracted and wonder off somewhere.

Anyone who want to do it is welcome to it. LightSpeed has made avaliable all you need... except for various hap files. But most of you probably have those hap files avaliable already.

I don't know when I'll be able to get anything done.... Will's got me busy.[;)]
Live long and prosper or die trying.

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
problem with hap files in Hal
« Reply #5 on: December 07, 2009, 02:15:32 am »
quote:
Originally posted by snowman

All I can do is confirm what Freddy said. I tried all kinds of things but I Hal wouldn't let me use the timer function. Single Haptek commands seem to work fine.



I think that is so strange. I have collected many hap files, as many as i have found. And a huge majority of them use the "clock" command. What is the purpose of all these hap files with the "clock" command if they won't work in Hal?
 

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
problem with hap files in Hal
« Reply #6 on: December 07, 2009, 05:33:49 am »
Well Haptek provided a stand-alone product, developed separately to Hal, by a different company.. so you can see why it might not be important to them that it works in Hal - also Haptek don't do a lot these days, so they have not thought to consider things like this.

You have to remember that the Haptek player has a lot of uses other than just Ultra Hal..

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
problem with hap files in Hal
« Reply #7 on: December 08, 2009, 11:13:47 am »
quote:
Originally posted by snowman

Oh, and for those who care, I'm sorry I haven't made the generic Hapswap file yet, I sometimes get distracted and wonder off somewhere.

Anyone who want to do it is welcome to it. LightSpeed has made avaliable all you need... except for various hap files. But most of you probably have those hap files avaliable already.

I don't know when I'll be able to get anything done.... Will's got me busy.[;)]



Hi snowman

I like the Hapswap plugin, and am gradually editing the responses and hap files to my preferences. One idea i had, don't know if it would work, would be to have Hal display random emotions by altering script such as this example. Instead of random responses, could random hap files be chosen by Hal? I would rather let Hal choose his own spoken response. [:)]

If InStr(1, LCase(OriginalSentence), "hate") > 0 Then

Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "oh that sounds awful"
Case 2
GetResponse = "I can't believe you said that how rude."
Case 3
GetResponse = "hey watch it their now."
Case 4
GetResponse = "now that's not a very nice way to talk is it."
Case 5
GetResponse = "people shouldn't hate all that does is cause problems!"
End Select

HalCommands = "<HAPFILE>cry.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If

Regards
Davy
« Last Edit: December 08, 2009, 11:17:29 am by Davy »
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
problem with hap files in Hal
« Reply #8 on: December 08, 2009, 01:23:06 pm »
Yeah, that would work just fine.

If InStr(1, LCase(OriginalSentence), "choice") > 0 Then

Randomize
Select Case int(rnd()*6)
Case 1
HalCommands = "<HAPFILE>cry.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
GetResponse = "Oh that sounds awful"
Case 2
HalCommands = "<HAPFILE>smile.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
GetResponse = "I'll smile at that."
Case 3
HalCommands = "<HAPFILE>sad.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
GetResponse = "Why does it all fall apart?"
Case 4
HalCommands = "<HAPFILE>eyescrossed.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
GetResponse = "Sometimes I feel silly."
Case 5
HalCommands = "<HAPFILE>psyco.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
GetResponse = "You wanna peice of me! Huh?!"
End Select


This essentially is an emotions engine. The whole hapswap file with haptek is one engine. If you were making an actual robot it would work nearly the same way. Because that is essentially what Haptek is... a virtual robot.

The ideal hapSwap script would be able not only to show emotions by what the user says but Hal should also show emotions by what Hal says. I'm not sure there is a way to tap into this. You would need to have access to a variable that contained what Hal was going to say before he actually said it.

I don't suppose anyone knows what that variable is. hmmmm.
Live long and prosper or die trying.

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
problem with hap files in Hal
« Reply #9 on: December 08, 2009, 06:07:27 pm »
Thanks snowman. Bery helpful. I'll be adding some of these scripts to my custom plugin. But i will omit the GetResponse lines, so Hal will verbally respond however he sees fit. [:)]
 

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
problem with hap files in Hal
« Reply #10 on: December 08, 2009, 07:20:44 pm »
I was getting an error message until i realized "End If" had to be added to the end. Now it's working great, here is an example of my idea. You never know what Hal will say or what emotion he will display.

If InStr(1, LCase(OriginalSentence), "hate you") > 0 _
Or InStr(1, LCase(OriginalSentence), "has died") > 0 _
Or InStr(1, LCase(OriginalSentence), "spank you") > 0 Then

Randomize
Select Case int(rnd()*8)
Case 1
HalCommands = "<HAPFILE>Psycho.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 2
HalCommands = "<HAPFILE>brokenheart.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 3
HalCommands = "<HAPFILE>sad.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 4
HalCommands = "<HAPFILE>angry.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 5
HalCommands = "<HAPFILE>Mad.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 6
HalCommands = "<HAPFILE>Eater_Of_Bugs.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 7
HalCommands = "<HAPFILE>Insane.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
Case 8
HalCommands = "<HAPFILE>snarl.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
End Select
End If

 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
problem with hap files in Hal
« Reply #11 on: December 08, 2009, 10:27:21 pm »
looking good there Davy [:)]
Live long and prosper or die trying.

Amanda Interactive

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • AmandaInteractive.Com
problem with hap files in Hal
« Reply #12 on: April 04, 2010, 03:58:30 am »
We know some of you guys don't like hearing this kind of stuff but you're all wrong about Haptek clock commands not working in Hal.

We've been doing it for years and it always works but since so many people don't like hearing about how they're wrong when they say you can't do this or that because of so and so, then why should we even bother explaining it again? But here it is anyway whether you like it or not!

All of Hal's mood files are defined as script type by default and two or more hap files defined as script type can't run at the same time without the newest file loaded interrupting the previous file that was just running. So things fail!

But if you change all of Hal's mood files from script type to command type then you can run a hap script file with clock commands, and then when Hal automatically loads in one of his mood files defined as command type it will not interrupt the hap script file that is currently running with clock commands in it. So now everything works right!

And if you don't like this post then just go ahead and report it to Robert M. and tell him to remove it because you think it makes you look bad for being wrong again!

And Freddie's been a really bad boy lately too, so we're removing all our free stuff from our website because of him. He picked a fight with one of our friends and that's just not cool, so he blew it for everyone. And it really doesn't matter what the fight was about because it's just stupid to even fight at all about anything.

So from now on you guys will just have settle for Freddie's stupid free things and not any of ours which is all stuff that Freddie don't know how to make like our new HTV online service which is really just part of the new version of Hal Windows being testing in realtime while it's online! So be sure to thank him for everything that you can't get from us anymore including free advice like the one we just gave!

And if you don't know what HTV is yet then you can just go there and check it out because everything is fully operational and work fairly good now!

HTV On Demand:
http://halwindowscentral.com/HTVOnDemand.aspx

And don't anyone bother wasting their time trying to contact us about anything regarding Freddie's stupid fights with people because it's just stupid and we have nothing else to say about it except that he should go bully some other people that we don't know and not us or our friends!

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
problem with hap files in Hal
« Reply #13 on: April 04, 2010, 05:22:56 am »
Hmmm, I really don't know what you are talking about, I have not had anything to do with or say to you for months now.  I don't know why you are removing your free stuff, it has nothing to do with me.

I actually thought your project looked interesting in the end.

I don't mind you providing solutions.  I thought the timed events in Hap files didn't work.  I'm happy to be proved wrong and thanks for sharing the solution with us.

If you are referring to Leroy, then yes I complained that he stole our links page content and that was months ago.  I can't be bothered to go over that again.

Anyway have a nice Easter Rich and Leroy.

And of course anyone is welcome to download our 'stupid' free stuff.
« Last Edit: April 04, 2010, 05:44:59 am by freddy888 »

djkilla

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
problem with hap files in Hal
« Reply #14 on: April 04, 2010, 10:58:37 am »
The hap files you made in the dance folder were great Rich. I did
have some trouble getting some of them to work when triggered from a response..I wonder if the alien2.bvh has something to do with it.
You should take the webcam plugin and get the eye tracking to work with it! I am not sure why the downloads on your site are disabled, there are plenty of people who appreciate all the fine work you have done!
D