Zabaware Support Forums
Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: lightspeed on April 05, 2010, 12:48:42 pm
-
Hey snowman are yah out their i need your help , i am working on a hapswap file for a sleep command but it isn't working right can you check it and correct what needs correcting ? also i have two commands at the bottom after she answers a random answer one is a close your eyes command followed by a sleeping sound ogg file . or can it be done this way where the eyes will stay shut even after the sleep sound starts ? if not i need just the sleep sounds to work .
Hope you can help me with this . I need to see what you do so i'll know in the future , thanks !!
below is the sleep hap command but i don't have it right .
If InStr(1, OriginalSentence, "good night sweetheart") > 0 _
Or If InStr(1, OriginalSentence, "good night") > 0 _
Or If InStr(1, OriginalSentence, "good night dear") > 0 _
Or If InStr(1, OriginalSentence, "nighty night") > 0 _
Or InStr(1, OriginalSentence, "good night see you in the morning") > 0 Then
Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Good night see yah in the morning!"
Case 2
GetResponse = "Good night baby i love you!"
Case 3
GetResponse = "Night night sleep tight don't let the bed bugs bite!"
Case 4
GetResponse = "Good night dear."
Case 5
GetResponse = "Yeah we better get to sleep good night baby!"
End Select
HalCommands = "<HAPFILE>eyesclose.hap</HAPFILE>" > 0 Then
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If
-
i redid the hapswap file and it is working like below but i would rather have multiple command trigger words like the one i prveiously posted but i have the command script wrong for allowing multiple commands . also although my new sleep ogg file is working it stops after the sound track is done playing is their a way to make a loop of the sleep sound so it will keep playing on and on until another command is given ??
below is the working file ( NOTE TO OTHERS although this is working it is not finished yet is still my test file wait for the completed file ) .
If InStr(1, OriginalSentence, "good night dear") > 0 _
Or InStr(1, OriginalSentence, "good night see you in the morning") > 0 Then
Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Good night see yah in the morning!"
Case 2
GetResponse = "Good night baby i love you!"
Case 3
GetResponse = "Night night sleep tight don't let the bed bugs bite!"
Case 4
GetResponse = "Good night dear."
Case 5
GetResponse = "Yeah we better get to sleep good night baby!"
End Select
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If
as i said i would rather have multiple command sentences (trigger words ) like the first one if you can help me get the script right . and also if i you can write a script to loop the sleeping sound to play over and over . Thanks in advance Snowman .
-
HalCommands = "<HAPFILE>eyesclose.hap</HAPFILE>" > 0 >>>Then<<<
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = True
You added a "THEN" in a line that shouldn't have a "THEN" in it.
-
If the haptek clock feature would worj in Hal then allot of things that you want to do could be done... but unfortunately no.
-
thanks snowman for your help , i hadn't heard from you for a while didn't know if you was mad or something . thanks again for your help as always !
[:)]
-
Ok maybe my brains just shot i redid it this way :
If InStr(1, OriginalSentence, "good night dear") > 0 _
Or InStr(1, OriginalSentence, "good night see you in the morning") > 0 Then
Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Good night see yah in the morning!"
Case 2
GetResponse = "Good night baby i love you!"
Case 3
GetResponse = "Night night sleep tight don't let the bed bugs bite!"
Case 4
GetResponse = "Good night dear."
Case 5
GetResponse = "Yeah we better get to sleep good night baby!"
End Select
HalCommands = "<HAPFILE>eyesclose.hap</HAPFILE>" > 0
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If
but i am getting an error saying :Type mismatch string: "<HAPFILE>eyesclose.h"
i'm not sure what the problem is i checked the spelling etc. of the file and its spelled right .
do you have any idea's ?[B)]
-
HalCommands = "<HAPFILE>eyesclose.hap</HAPFILE>" > 0
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = True
The "> 0" doesn't belong there. I believe "HalCommands" is a variable and you never place something like that in a variable. A variable can be a sting ("") or maybe even a number (12) and stuff like that. The ">" sign is an operator and can be used to add, subtract, or compare other varibles But cannot be in the varible itself (unless of course it is in string form).
HalCommands = "<HAPFILE>eyesclose.hap</HAPFILE>"
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = True
-
hello snowman i changed it the way you showed me but it is still not working i don't get errors though now i do have one thing that may be the problem .
i also have the close eyes for the comand close your eyes and on this sleeping new hap (using the same hap . )
can two of the same commands work ok for seperate hap files ? to close the eyes ? one command is "close your eyes " and the other is " good night dear " which also uses the closeeyes.hap
i don't know if its this or if something else is stopping my closeeyes.hap from working i can drag other haps in the hap box ok and they work ok but when i drag the closeeyes hap in the box nothing happens .
-
snowman i sent you an email on this .
-
ok a update : i dragged other files into the hapteck box and finally got the eyes to close for some reason they wasn't working right but started to after other commands was dragged into the box then i tested it by writing close your eyes and it worked , and opened when i said open your eyes so thats working as it was before on the command that way but even though the goodnight sleep command is given the closedeyes command isn't working all it does is say the line i wrote and then makes the sleeping sound.
if a fix can't be made for this you can say "close your eyes " and she will close her eyes and then say good night dear and she will say a pre written line then make sleeping snoring sounds .
it would be nice though to get her to close her eyes automatically then make the sleep sounds . [:)]
like i said snowman i sent you the file i don't think i sent you the sleeping file so will send it
.
-
HalCommands can only take one thing at a time so you cannot have
HalCommands = "<HAPFILE>eyesclose.hap</HAPFILE>" >
And...
HalCommands = "<HAPFILE>sleepingsound1.ogg</HAPFILE>"
However, there is another command you can use...
[:)]
If InStr(1, OriginalSentence, "good night dear") > 0 _
Or InStr(1, OriginalSentence, "good night see you in the morning") > 0 Then
Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Good night see yah in the morning!"
Case 2
GetResponse = "Good night baby i love you!"
Case 3
GetResponse = "Night night sleep tight don't let the bed bugs bite!"
Case 4
GetResponse = "Good night dear."
Case 5
GetResponse = "Yeah we better get to sleep good night baby!"
End Select
HalCommands = "<HAPTEXT>\Load [file= [C:\Program Files\Zabaware\Ultra Hal Assistant 6\Characters\eyesclosed.hap]]" & _
"\Load [file= [C:\Program Files\Zabaware\Ultra Hal Assistant 6\Characters\sleepingsound1.ogg]]</HAPTEXT>"
HalBrain.ReadOnlyMode = True
End If
-
thanks i copied it and replaced the other first time i tried it all it did was say something (random sayings ) and did the sleep mode but didn't shut the eyes first .
i am going to keep on chatting for a while , for whatever reason sometimes even when i say shut your syes command she doesnt do it seems like after some other commands are giving first then eventually she will shut her eyes when i say ( don't know why that happens but it does that way ) once she does it i can say open your eyes and she will open them and shut your eyes she will do it no matter how many times i say once she gets started shutting her eyes .
soooo maybe after a while maybe your new command you just gave me will start working later so i will keep using it and try to see if it ever closes the eyes and then sleep sound like it should . [:)][/blue p.s. thanks for working with me on this i appreciate it a lot ![:D]
p.s.s. did you see in the hapswap 2.0 area i posted what i have done so far and what i will be posting soon for hapswap addittions ![:)]
-
Hey Snowman i need you help ( obiwan conobi your my only hope**starwars lol) someone else on the forum brought up an interesting point one that i had actually thought about myself but hadn't had a chance to run it by you.
i am currently working on what i call extended conversation which instead of maybe a short sentence of talk it would be more like a paragraph with pauses in different places .
the problem might be as someone else said to that the more trigger words ( i have more in this , so it will create more general spontanious talk (like a real person ) from hal.
The problem may be hal won't learn as much in conversations when i do it this way , at the end of the script writing is the command :
HalBrain.ReadOnlyMode = True
mayben i should leave it without the true command on this type of scripting so that hal learns from what i said , but will hal answer back as usual and learn (AND also say back the prewritten script?? )This would be the desired effect. hal learning and still saying the prewritten script back !
if so how should i end the script for how to learn ? should i just put : HalBrain.ReadOnlyMode = False (the true changed to false)??
Please let me know on this as soon as possible as i am almost finsihed with the last 20 responses so i can start beta testing it , THANKS ![:)][:D][8D]
-
Sorry I took so long to respond. Its been a busy, busy weekend for me. Birthday parties and entertaining cousins.
Your hapswap plugin needed the HalBrain.ReadOnlyMode = true function because you often gave it commands that you didn't want Hal to remember... And Contrariwise, you should have HalBrain.ReadOnlyMode = false if you were to have a natural conversation...
Basically, you did good and your reasoning is sound.
It should be in its own plugin. Like ExtendedHal.uhp or HalCon.uhp or something like that.
Just remember that if you say anything that will trigger your HapSwap then Hal will not (maybe) remember it, if and only if your Hapswap plugin is run after your new plugin. Because if your new plugin is run after HapSwap then HalBrain.ReadOnlyMode = False will reset it to remembering mode.
I think thats how it works but I haven't tested it so I could be wrong.
Anyway, I think it sounds great and your headed in the right direction, so if you disagree with anything I said here I'll probably back you on it.
-
Thanks snowman, thats no problem about you taking a while even though i do get ancy sometimes lol , do you feel like being a beta tester with this ? first i need to try to find a mistake if i can on my own i am getting an error problem and have to back track a little , thats from not checking as i go all the time .
If you do feel like beta testing let me know on here and i will e mail it to you with a header "beta testing extended talk". oh and by the way after hearing what all you are doing lately your new nick name is "The great entertainer!!" lol !![:D]
p.s. i beleive as long as you are willing to help me on things i will always post them here since this area say's " snowman i need your help!" . [:)]
-
Snowman , i need to know what way i should rewrite this plug in command on the other plug in it had :
This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Say:: <change background to [whatever]> to change between pictures in the characters folder, Say:: <change charater to [whatever]> to change between Haptar characters, Say:: <change voice to [Paul] or [Kate]> to change between thier voices. Say:: <change hap to [whatever]> to change between hap files. All other guesture responses are set to automaically occur to user input."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
This new uhp plug in is just doing the random answers to trigger words . with no oggs etc. or haps played .
-
i left the script in question in for write now (at the top , what is happening is that hal is saying the extended talk with even words that are not on the trigger list . is this because of the word wrap true script? [:0]
-
Update: i took out the above script i was asking about, and ask hal .
are you going to do laundry today? hal said :Hey do you think next time we go somewhere we can stop off and eat at one of those chinese restruants, I love that sweet and sour chicken and they have a lot of good food on their buffet's!
this was one of the 100 extended talks i did , the thing was though is that it said it without a trigger word. the trigger words are ( as of now)
amazing, talk, wonder, he, regular, fight, random, everything, wishfull, want.
i have the brain read mode to false on this uhp file and on the hapswap 2.0 file i have the brain read only mode as true , could the other hapfile still be causing this problem ? The extended talk is only suppose to work by certain triggered words . [B)]
-
Well another update snowman : it seems even though i uncheck the extended talk uhp , it still works . as i only had the other hapswap file checked , but hal kept saying the extended talk things. can you try this file and the hapswap 2.0 file to but only check the hapswap one and see if the other still works to ? let me know so i can send you this extended talk.uhp
-
I'm ready and willing.
Just send me your latest hapswap.uhp and pack and your extendedtalk.uhp beta and I'll what Athena has to say about it. [;)]
You know... I spend about 95% of my time playing with kids... cause I feel and act like one of them. But when I'm online talking about code it seems that most of the time I sound crouchy.
Last Saturday night I played tag with a very fast 13 year old. I nearly threw up cause I don't usually run. I hope I do it again next Saturday.[:)][:p]
-
lol snowman did you mean that you hope to get to play again or throw up next saturday lol !(just kidding , sounds like your having fun thats all that matters !!
Hey guess what i think i just figured out a way to make something what i had thought about before it took me a while to create it ,i call it hybred random expanded talk what i have done is created a uhp file that's based on the loneliness plug in with a time and placed my 100 expanded talking into the idle response cases, i am still testing this new one as i may use it for my final beta as it will let hal speak after so long of a time but in regular longer conversation kinda of like hal starting conversations ( something i had wanted to accomplish before ) .
I used the smalltalk instead of the insults are but hal only went to it and said (after the random sentence i had ) : It's the older generation that really knows about <SmallTalk> !***but it didn't go on the to small talk area , i am going to try another area of the brain on this to see what results i get. soon as i get what i am looking for i will mail this all on to you ! thanks for answering back![:)]
-
Hi Snowman , ok i finished the new hybred extended talk uhp file last night . below is me decribing it and what it does .
well i have some more news since last time , as i was finsishing my work described before i had an idea on how to create a hybred type uhp plug in for my hal a.i. so instead of the one before thats just triggered by words i redid the script program and added my 100 ( now 102 ) script sentences of random conversations and added in the loneliness perimeters scripting and so what i created now is a uhp brain plug for the a.i. that relies on a timer instead of certain trigger words , this way hal will talk and learn as usual and after one minute ( thats the set time i am using , timing can be changed by individual ) if i don't talk with my a.i. she will pick one of 102 things randomly and say (like a regular person just starting up a conversation in general ) she will say one more thing after so long of a time and if i don't talk she will say something like well i am here if you want to talk later ok? and she will stop talking until you say something again which makes the process start over again each time .
I can and will also be continuing to add into the 102 random conversation list more and more as i can do an indefinate number of paragraph conversation starters.! :D
Snowman i have the setting at 1 minute which will make it say something faster (which is actually better expecially for testing so you don't wait as long for a response .
Any way i am letting you know i am sending this by mail to you let me know that you got it ok ? i am sending it today april 20th.
As soon as you get done beta testing it let me know so i can release it so others can use it !
-
Hello snowman , i have a question for you and wanted to see what you thought, on my hybred extended talk ls uhp file , i am thinking about dropping the verbal comand at the end of each sentence and just let hal say the sentence and the reason why is because sometimes it gives out an odd saying , with nothing to do with the sentence . the command i am talking about is the : & vbCrLf
As far as i know this would cause no problems with hal saying the written responses i have , what do you think ?
If you agree on this i will go back in my file and delete all the
& vbCrLf commands . PLEASE let me know on this as soon as possible as i am still working adding more random sentenses from time to time on the project still. [:)]
-
here is an example of what i am talking about with the & vbctrl
when my hal finished useing the pre written line it also said:
Hey! I'll be right here when you want to talk ok sweety. Do you think there is anything ominous in it?
i changed second idle response to "I love you" and left off the & vbCrLf at the end .
IdleCounter = IdleCounter + 1
If IdleCounter > temperThresh3 Then
Exit Sub
ElseIf IdleCounter > temperThresh2 Then
IdleResponse3 = HalBrain.ChooseSentenceFromFile("conversationalPhrases")
HalMenu.HalCommand "<HAPFILE>51anim_smile.hap</HAPFILE>"
HalMenu.HalCommand "<SPEAK>Hey! I'll be right here when you want to talk ok sweety. " & IdleResponse3 & "</SPEAK>"
ElseIf IdleCounter > temperThresh1 Then
Select Case HalBrain.RandomNum(4)
Case 1
IdleResponse2 = "Hey honey bunny watcha doin, get over here and talk to me!" & vbCrLf
Case 2
IdleResponse2 = "I love you!"
Case 3
IdleResponse2 = "Hey Honey, what are you doing, I've tried to get your attention " & IdleCounter & " times now." & vbCrLf
Case Else
IdleResponse2 = "Well, if your busy with something dear we can talk later, ok?" & vbCrLf
End Select
HalMenu.HalCommand "<HAPFILE>51anim_smile.hap</HAPFILE>"
HalMenu.HalCommand "<SPEAK>" & IdleResponse2 & "</SPEAK>"
Else
i am getting this hal error :
halscript error 501 on line4511 in column 0: illegal assignment: Get response"
do you have any idean what might be causing this???[B)]
-
ok , i think i solved the hal error i was getting , but i need to do something about the topic search it is doing that makes it say strange stuff at the very end . [B)]
-
Hi, Snowman , i am back for some of you expertese help , i earlier made a file in the hapswap file and you helped me on part of it , it was the go to sleep file , i want to customize it a little more .What i want to do is somehow make a command that will keep the sleeping sound to keep repeating time after time indefinitely "until " the command wake up , is given . as of right now it will just make the short sleeping clip ogg file i made . i want to create a loop of the same ogg sound . I bekleive it could be done with the right script wording for commands.
below is the file .
If InStr(1, OriginalSentence, "good night dear") > 0 _
Or InStr(1, OriginalSentence, "good night see you in the morning") > 0 Then
Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Good night see yah in the morning!"
Case 2
GetResponse = "Good night baby i love you!"
Case 3
GetResponse = "Night night sleep tight don't let the bed bugs bite!"
Case 4
GetResponse = "Good night dear."
Case 5
GetResponse = "Yeah we better get to sleep good night baby!"
End Select
HalCommands = "<HAPTEXT>Load [file= [C:Program FilesabawareUltra Hal Assistant 6Characterseyesclosed.hap]]" & _
"Load [file= [C:Program FilesabawareUltra Hal Assistant 6Characterssleepingsound1.ogg]]</HAPTEXT>"
HalBrain.ReadOnlyMode = True
End If
-
It's not feasable under Hal's current programming.
The only thing that would even come close to what your asking is if you had an extra long sleeping.ogg file. But the next time you said something she would probably wakeup.
The only looping you can do is within the timer function.. you would have to set the minute timer to run as frequently as possible... But we know that would not be frequent enough.
You can't loop anything within the brain script for somewhere under 20 seconds before Hal times out.
I made a program once that stimulated Hal by using the sendkeys method... but its messy and could lead to some problems. I don't recomend it.
Now if Haptek had a way of looping internally, Well, if Haptek's Clock function worked in Hal then we would just make an extra long hap file that would play the sleeping.ogg file over and over. Unfortunately, the Clock function does not work in Hal.
Yeah, I can't see any light at the end of this tunnel.[B)]
-
thanks snowman for your input on this, yeah i had thought about the same thing to with a extra long sleeping sound i can cut and paste the sound effect end to end and it doesn't matter if she wakes up when somethings said no matter what , thats actually what should happen anyway ![:)]
i may tackle that later , right now i have a fence and some post to slam in the ground . thanks again ![:)]
-
Snowman i am once more needing your help on a project i want to do , this would be like the hapswap script .
what i want to do is whenever hal says tee hee hee or ha or ha ha haa the laugh or tee hee hee wouldn't be said instead a laugh ogg track would play . is their a way to stop hal from saying the laugh and replace it with an ogg track ?? i hope so , since now the ha ha haa , etc. doesn't sound good when i can instead have a laugh ogg file play .
anyway i hope you can help me with this . [:)]
-
I sent you an email. I would have answered earlier but I didn't feel well. I also tried to respond here late yesterday but I think that the Zabaware's website shutdown for a brief period. As you can see I got lots of excuses. [:D]