For the past few days I have been tearing apart code for alarm clocks and examining other bits of code and have come up with a partial solution to what I was looking for.
Using info I have gathered on this board I created 2 hap files for 2 different outfits. One I called work.hap and the other I called casual.hap. All these 2 files do is point to a texture for the Haptek model.
For example (casual.hap):
#Haptek Version= 1.00 Name= Hap_Casual1 HapType= script FileType= text
##standard
settexture[ tex= [data/standard/skins/skimpyshirt.jpg]]
All texture files I placed in C:Program FilesHaptekplayerDatastandardskins
All hap files i placed in C:Program FilesabawareUltra Hal Assistant 5Characters
Then in the XTF 1.2 brain I added the following code:
If Time >= "09:00" And Time < "17:00" Then
HalCommands = "<HAPFILE>Work.hap</HAPFILE>"
Else HalCommands = "<HAPFILE>Casual.hap</HAPFILE>"
End If
If you do a search in the brain file for "'PROCESS: INITIALIZE VARIABLES AS INTEGERS", after the line that says "Randomize", leave a blank line and paste the above code there.
This does leave a problem that I am working on and maybe some others can help with this. The problem is that only 2 textures can be used. Every time you talk to Hal, it polls the brain file and then looks at that block of code. If the time is between 9 and 5pm then the work texture is applied. If during that time you tell Hal to use a different texture, the next line you type to Hal it will poll the brain file again and see that it is still work time and swap the texture back to the work outfit. Once 5pm hits and you are talking to Hal at that time you will see the model change into the casual outfit. Again if you tell Hal to change outfits, it will but when you tell it somethign again right after that Hal will poll the brain file and swap textures back to casual.
What i'm looking to do now is see if vbscript will allow me to copy files. So (if I can properly explain this) if I tell Hal to change an outfit, lets say its during working hours and Hal has a red and a blue suit. And we make a hap file for each, call them red_suit.hap and blue_suit.hap and each one points to the appropriate texture. Lets say that Hal is wearing the red suit and you want Hal to change to blue. Currently the brain file is looking at work.hap, can the scripting copy blue.hap and overwrite work.hap? And if so does anyone know how to code that?
I am also looking into expanding the code to look at the days of the week so that Hal only wears the work outfits during the weekday. I think I figured out how to do this but I have not gotten around to testing that yet.