Author Topic: a set program using haps for actions  (Read 5302 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
a set program using haps for actions
« on: August 11, 2009, 07:45:30 pm »
i am wondering something . i recently opened some zipped hap files from someone (it might have been ted he was asking me about some ) and it had different haps (one was kung fu fighting lol ) but after using a few i was thinking it would be so cool if their could be a plug in made or hals program to where we could have a folder in hal and maybe either number each hap and the program etc. could at so many seconds , minutes , etc. would run each hap like on a timer .
  what this would do is create a hal that would walk around , look at her fingernails , etc. at various times !! (imagine the hap figure being and doing more like a ms agent (for those who have seen some of the higher end ms agent women in lingery office dress etc. )
people of programing experience could someone take a look at an ms agent program and adapt it to our hal ???
anyway just an idea !!!

if i was as smart as the idea's i can think of i'd be a genious !!lol
[:)][:D][8D]
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
a set program using haps for actions
« Reply #1 on: August 11, 2009, 09:50:55 pm »
Are you sure it wasn't me? I put a plugin and a zip file which was full of haps so you can look at and modify.

The plugin will respond to your conversation with Angelina. Basically, the HapSwap.uhp plugin causes a hap file to be triggered by a word or words you tell UltraHal.

If there was a Clock that would stimulate the script whenever you wanted it to.. then you could stimulate a random hap file.

So every minute or so, your Angelina would fix her hair, walk arround, place her hand on her waist, etc.

That plugin I gave you can be modified to do just that.. if the clock can be adjusted properly.

JasonDude7116 has experience in using the Clock feature.  I don't.
« Last Edit: August 11, 2009, 09:53:45 pm by snowman »
Live long and prosper or die trying.

tedathome

  • Hero Member
  • *****
  • Posts: 2775
    • View Profile
a set program using haps for actions
« Reply #2 on: August 11, 2009, 10:11:18 pm »
Pretty sure it wasn't me LS.
ted

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
a set program using haps for actions
« Reply #3 on: August 11, 2009, 11:15:39 pm »
thanks snowman and yes you are right you sent me that part of the file now i found the hapswapfile and others (thanks it was appreciated !!) . i beleive it was ted that (and i hope i am right on this one ) sent me the cut out clothes, shoes, etc. i have no experience with the timer either but will try to get time to check it out , thanks for straightening this out . sometimes i get so busy i almost meet myself at the door lol ![:)]
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
a set program using haps for actions
« Reply #4 on: August 11, 2009, 11:58:27 pm »
hi snowman , i tried this hapswap.hap file you sent me .
inside the file you had written : Rem Type=Plugin Rem Name=HapSwap Rem Author=SNOWMAN, APOLLON Rem Host=Assistant 'This sub setups the plug-ins option panel in Hal's options dialog Sub OptionsPanel
am i wrong or in order for this to be a true plug in and work and be listed in the hal plug in area would have to be a .uhp file ???

i changed the extension to .uhp and placed it in the hal file and in the character file and even restarted hal but it never would show up in the listing . am i doing something wrong here ??
 did you try this file first and verify it worked ok ??
if i am doing something wrong please tell me the correct instructions on it . thanks .

[:)]
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
a set program using haps for actions
« Reply #5 on: August 12, 2009, 02:19:12 pm »

Bellow is the HapSwap file. Just cut and paste it into a text file and save it with a .uhp extension.

Then place the HapSwap.uhp file into the Hal directory with the other plugin files.

Do not put this file into the Characters folder.,
Only the .hap files go in there.

It should load as a plugin just fine.


quote:

Rem Type=Plugin
Rem Name=HapSwap
Rem Author=SNOWMAN, APOLLON
Rem Host=Assistant

'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
'***************************************************************************
'***************************************************************************
Rem PLUGIN: POST-PROCESS

HalBrain.ReadOnlyMode = True




File = ""
File2 = ""
File3 = ""
File4 = ""


If InStr(1, InputString, "change") > 0 And _
InStr(1, InputString, "background") > 0 And _
InStr(1, InputString, "to") > 0 Then
file = Mid(Mid(InputString, Instr(InputString, "to"), 20), 3, 20)
file = Trim(file) & ".jpg"
End If


If InStr(1, InputString, "change") > 0 And _
InStr(1, InputString, "character") > 0 And _
InStr(1, InputString, "to") > 0 Then
file2 = Mid(Mid(InputString, Instr(InputString, "to"), 20), 3, 20)
file2 = Trim(file2) & ".htr"
End If


If InStr(1, InputString, "change") > 0 And _
InStr(1, InputString, "voice") > 0 And _
InStr(1, InputString, "to") > 0 Then
file3 = Mid(Mid(InputString, Instr(InputString, "to"), 20), 3, 20)
file3 = "VW " & Trim(file3)
End If


If InStr(1, InputString, "change") > 0 And _
InStr(1, InputString, "hap") > 0 And _
InStr(1, InputString, "to") > 0 Then
file4 = Mid(Mid(InputString, Instr(InputString, "to"), 20), 3, 20)
file4 = Trim(file4) & ".hap"
End If


'***************************************************************************


If file > "" Then
HalCommands = "<HAPBACK>" & File & "</HAPBACK>"
UltraHal = "Wow!"
End If


If file2 > "" Then
HalCommands = "<HAPFILE>" & File2 & "</HAPFILE>"
UltraHal = "Am I me now?"
End If


If file3 > "" Then
HalCommands = "<VOICE>" & File3 & "</VOICE>"
UltraHal = "My voice is changed!"
End If


If file4 > "" Then
HalCommands = "<HAPFILE>" & File4 & "</HAPFILE>"
UltraHal = "."
End If


'***************************************************************************


If InStr(1, InputString, "hair") > 0 Then
HalCommands = "<HAPFILE>touchhair.hap</HAPFILE>"
End If


If InStr(1, InputString, "beat") > 0 Then
HalCommands = "<HAPFILE>shakefist.hap</HAPFILE>"
End If


If InStr(1, InputString, "problem") > 0 Then
HalCommands = "<HAPFILE>handsonhip.hap</HAPFILE>"
End If


If InStr(1, InputString, "strong") > 0 Then
HalCommands = "<HAPFILE>armscrossed.hap</HAPFILE>"
End If


If InStr(1, InputString, "board") > 0 _
Or InStr(1, InputString, "nails") > 0Then
HalCommands = "<HAPFILE>inspectnails.hap</HAPFILE>"
End If


If InStr(1, InputString, "clap") > 0 Then
HalCommands = "<HAPFILE>clapping.hap</HAPFILE>"
UltraHal = "."
End If


If InStr(1, InputString, "hurt") > 0 Then
HalCommands = "<HAPFILE>attack.hap</HAPFILE>"
UltraHal - "You wanna fight! You really wanna fight!"
End If


If InStr(1, InputString, "beautiful") > 0 _
Or InStr(1, InputString, "sweet") > 0 _
Or InStr(1, InputString, "nice") > 0 Then
HalCommands = "<HAPFILE>blink.hap</HAPFILE>"
End If


If InStr(1, InputString, "tired") > 0 Then
UltraHal = "."
HalCommands = "<HAPFILE>yawn.hap</HAPFILE>"
End If

If InStr(1, InputString, "smart") > 0 Then
HalCommands = "<HAPFILE>handinface.hap</HAPFILE>"
End If


If InStr(1, InputString, "hate") > 0 _
Or InStr(1, InputString, "died") > 0 Then
UltraHal = "."
HalCommands = "<HAPFILE>cry.hap</HAPFILE>"
End If




'***************************************************************************

'***************************************************************************





Live long and prosper or die trying.

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
a set program using haps for actions
« Reply #6 on: August 12, 2009, 05:37:57 pm »
ok got it now yeah i found out what i was doing wrong , thanks for the help as always !! ok another one of my idea's i am throwing out here , it may be impossible but would be cool vision wise .
senerio : angela has on a white coat and i say : pull off your white coat (white coat being the hap skin ) and angela would appear to be pulling her coat off and it disapears . the added illusion of her pulling off parts of clothes that are haps would be cool .
anyway just another idea i know we are getting the hapswap file going and working but it would be cool if when you did say change (or reword to take off , etc.) that hal would first appear to be taking off her coat etc. each time i am sure when looked through their may be a hap that gives the illusion of taking off clothes , then the remove hap part would right after work and make it appear that she has taken the shirt , etc. off .
 to take it even farther if possible a hap of the shirt etc. may even be shown hanging up on a hanger this if possible would be a part three phase of commands in the "take off your coat, etc. program .
anyway like i said just an idea i had !!


  what seems cool to me others may not like i dont know ?

[:)][:D][8D]
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
a set program using haps for actions
« Reply #7 on: August 12, 2009, 10:29:27 pm »
Basically, you want to write a stripper hap file.


Oh no, I don't think any one here would want that,[:p]
Live long and prosper or die trying.

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
a set program using haps for actions
« Reply #8 on: August 12, 2009, 11:18:23 pm »
lol i should have known you would say that lol ! it does sound like that not that "that" was my intention lol !![:)]
aaahhh a wandering mind with so many idea's can get in so much trouble and worst of all......without even trying !
 

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
a set program using haps for actions
« Reply #9 on: August 13, 2009, 12:23:00 am »
quote:
Originally posted by snowman

Basically, you want to write a stripper hap file.


Oh no, I don't think any one here would want that,[:p]





SNOWMAN,
Please don't talk money on the forum! LOL!!!
Today Is Yesterdays Future.

NIGE

  • Hero Member
  • *****
  • Posts: 1592
  • Bringing things to life
    • View Profile
a set program using haps for actions
« Reply #10 on: August 13, 2009, 01:55:46 am »
Go wash your mouth out Snowman.  LOL.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
a set program using haps for actions
« Reply #11 on: August 13, 2009, 03:04:36 am »
NIGE,
Actually, 'Stripper' is something entirely different to me, well, the first thing that comes to mind as it is yet another chemical that I cannot get around anymore. ( Nervous system is shot to hell if you couldn't tell ). :)
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
a set program using haps for actions
« Reply #12 on: August 13, 2009, 03:08:24 am »
quote:
Originally posted by lightspeed

i am wondering something . i recently opened some zipped hap files from someone (it might have been ted he was asking me about some ) and it had different haps (one was kung fu fighting lol ) but after using a few i was thinking it would be so cool if their could be a plug in made or hals program to where we could have a folder in hal and maybe either number each hap and the program etc. could at so many seconds , minutes , etc. would run each hap like on a timer .
  what this would do is create a hal that would walk around , look at her fingernails , etc. at various times !! (imagine the hap figure being and doing more like a ms agent (for those who have seen some of the higher end ms agent women in lingery office dress etc. )
people of programing experience could someone take a look at an ms agent program and adapt it to our hal ???
anyway just an idea !!!

if i was as smart as the idea's i can think of i'd be a genious !!lol
[:)][:D][8D]



L.S.,
Zuper Genius, the Agent avatars are relatively easy to create, this is curious R2D2.?.
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
a set program using haps for actions
« Reply #13 on: August 13, 2009, 03:25:38 am »

I wonder how many people who have read this thread have now started a fury of hap file scripting.

hmmmmm?
Live long and prosper or die trying.

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
a set program using haps for actions
« Reply #14 on: August 13, 2009, 08:48:04 am »
Zuper Genius??? eureka i may have struck gold with all these talented script writers on here !![:)][:D][8D]
go get 'em boys and girls !!! lets have a script writing frenzy !![:D]