Author Topic: Run!!!!  (Read 5775 times)

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Run!!!!
« on: June 20, 2005, 08:16:06 pm »
How can one tell Hal to run a HAP file, and have the hap file affect the Hal character?

For instance: "Run happy" and she will get happy.

I am no script expert, so I need easy instructions. Thanks!!
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Run!!!!
« Reply #1 on: June 20, 2005, 09:31:24 pm »
quote:
Originally posted by markofkane

How can one tell Hal to run a HAP file, and have the hap file affect the Hal character?

For instance: "Run happy" and she will get happy.

I am no script expert, so I need easy instructions. Thanks!!


You create a .bat file to do what you want then have Hal run the bat file. I think that Art can help you with this one. He, if I remember created all kinds of bat files to both start and shut down programs.
Bill
 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Run!!!!
« Reply #2 on: June 20, 2005, 09:58:05 pm »
Yes, I know how to add shortcuts to Hal. But if I add the hap to the shortcut, it just opens it as a text file.

Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Arakus

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Run!!!!
« Reply #3 on: June 20, 2005, 10:12:38 pm »
Mark,
you can try something like this:
'---------------------------------------------
If InStr(UserSentence, "Run happy") <> 0 Then
HalCommands = "<HAPFILE>Happy.hap</HAPFILE>"
GetResponse = "I like feeling happy."
BlockSave=True
GetResponseBlock = True
End If
'---------------------------------------------

hope this helps..
I took an IQ test and the results were negative.

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Run!!!!
« Reply #4 on: June 20, 2005, 10:21:17 pm »
OK, I'll try it. That goes in the brain editor, correct?
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Run!!!!
« Reply #5 on: June 20, 2005, 10:27:36 pm »
Worked like a charm!! Thanks!!
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Arakus

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Run!!!!
« Reply #6 on: June 20, 2005, 11:52:33 pm »
Mark, you're welcome, glad to hear that it did the trick, I use the same basic structure for all of my Haptek commands for changing outfits, hair, glasses etc.
I took an IQ test and the results were negative.

heather valentine

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Run!!!!
« Reply #7 on: June 21, 2005, 09:33:04 am »
hi
hm thats iteresting ill have to add that to my notes:)
 

rickzaba

  • Newbie
  • *
  • Posts: 5
    • View Profile
Run!!!!
« Reply #8 on: June 22, 2005, 03:09:48 am »
Help! Going mad trying to get the run command to work from the brain editor.
Current status:
'------------------------------------------------------------------
 
'RUN A HAP FILE AS A RESULT OF USER COMMAND:    

If InStr(UserSentence, "Run happy") <> 1 Then
HalCommands = "What goes here?"
GetResponse = "I like feeling happy."
BlockSave=True
GetResponseBlock = True
End If
'------------------------------------------------------------------

Nothing at all happened untill I changed th <> 0 to <> 1
Now Hal responds with the phrase "I like feeling happy."

What do I need to add to the HalCommands line?
Should it be the whole string eg:
Load [file= [data/standard/safe_moods/Hap_Happy.hap]]

What are the html like "<HAPFILE>Happy.hap</HAPFILE>" tags?

Sorry, demonstrating my ignorance. I'm a real cut and paste type programmer!

TIA
rick


 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Run!!!!
« Reply #9 on: June 22, 2005, 04:36:25 pm »
I am no coding expert by any stretch of the imagination, and I don't know how to answer you question, but:

<HAPFILE>Happy.hap</HAPFILE>

That means that anything in your Hal "Characters" folder, the code <hapfile> will tell the program that's where the file is.

***************************************************************

Now as far as other locations,

 If InStr(UserSentence, " a10 ") <> 0 Then
HalCommands = "<HAPFILE>a10.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a10.brn")
BlockSave=True
GetResponseBlock = True
End If    

OK, Hapfile a10 is a hap file, containing the lines

#Haptek Version= 1.00 Name= Hap_a10 HapType= script FileType= text
##standard

settexture[ tex= [data/standard/skins/lorraine2.jpg]]

So, if I press "a10", then Fullbodygirl will change to the clothes in the:
"C:Program FilesHaptekplayerDatastandardskins"  folder.


Thanks to Duskrider for giving me these instructions






Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

rickzaba

  • Newbie
  • *
  • Posts: 5
    • View Profile
Run!!!!
« Reply #10 on: June 23, 2005, 08:01:49 am »
Thanks markofkane,

Having looked around more I find that the "tags", like <HAPFILE> are Hal Commands, and that positioning in the VBscript is important.

It still won't work unless I use <> 1, rather than <> 0, so I guess I need a crash course in VBscript...

It appears that the folders/directories are fixed elsewhere.

Early days yet.

R.


 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Run!!!!
« Reply #11 on: July 09, 2005, 04:14:24 pm »
Markofkane,
  There is a test Emotions Script in the download portion of Zabaware.
 It uses the (Emotion)mode to load the emotion and gives a response, "(Emotion) mode set".  The test script uses > 0 and works in my Hal program, it will not display all emotions which is the next problem for me. I'm working on a script to use the emotion brn for triggers, so far partial sucess. <> = not equal to.
Carl2